About persist

forum_thread

ODB lost?

I'm new to ObjectDB. While debugging small programs in single-step mode in NetBeans, the ODB appears to get corrupted or lost if I don't invoke close on EntityManager. If I re-run my program and get a new EntityManager, the instance behaves as if the data that was persisting is somehow gone. I noticed in the file system, indeed, the .odb file is gone, but there are <name>_<v>.odb files where <name> is the name of my odb and <v> is apparently a version number. Is there any way to recover <name>.odb? #1 2011-03-18 23:11 I'm new to ObjectDB. While debugging small programs in single-step mode in NetBeans, the ODB appears to get corru ...

 
forum_thread

Optimistic Locking

We are having problems with optimistic locking.  I made a simple test case to try to induce an optimistic lock.... ( properties ) ;   // Persist one Counter object: PersistenceManager pm = pmf. ...

 
manual

Chapter 3 - Using JPA

Explains how to store, retrieve, update and delete entity objects using JPA. This chapter explains how to manage ObjectDB databases using the Java Persistence API (JPA). The first two pages introduce basic JPA interfaces and concepts: Database Connection using JPA Working with JPA Entity Objects ...

 
forum_thread

Import data from MySQL

Hi, I tried the objectdb in my research, find it very easy to handle without setting up xml files. However, I cannot find the import/export functions between other database, then how can I transfer mysql data into objectdb? When I use explorer.exe to browse the database in objectdb, eclipse tells me another app occupy it, then how can objectdb support multi-thread? ... objects, detach the retrieved entity objects and then persist them into ObjectDB. An automatic data conversion utility is ...

 
manual

Numbers in JPQL and Criteria Queries

Shows how numbers, arithmetic expressions and numeric functions and operators (MOD, ABS) can be used in JPQL queries. Numeric values may appear in JPQL queries in many forms: as  numeric literals - e.g. 123 , -12.5 . as parameters - when numeric values are assigned as arguments. as  path expressions ...

 
forum_thread

createNamedQuery throws wrong exception

Hello I'm tying to use ObjecDB with spring-data for JPA and there is an issue where spring-data checks for existance of named query which does not exist yet. Based on JPA specification #1 2012-05-09 15:02 Hello I'm tying to use ObjecDB with spring-data for JPA and there is an issue where spring-data check ...

 
forum_thread

null pointer exception in objectdb-2.4.4_06

I have the following stack trace.  Is this a null ptr in our code or in the object db code? ... The stack trace indicates an attempt to persist (indirectly via cascading) an object with a null primary key. ...

 
api-jpa

javax.persistence.Embeddable

Defines a class whose instances are stored as an intrinsic part of an owning entity and share the identity of the entity.(Annotation of JPA)

 
forum_thread

Understanding limitations of schema evolution

Hi, I am trying to understand the limitations of schema evolution and have read the material on http://www.objectdb.com/java/jpa/entity/schema as well as the link therein regarding manual schema update when changing a field’s name Yet, i am confused regarding how to handle the case where one re-factors a class by moving one if it's Fields to a different class. Is this case managable? Thanks #1 2014-10-31 12:31 Hi, I am trying to understand the limitations of schema evolution and have read the material on http://www.objectdb.c ...

 
forum_thread

Delete object from collection versus delete from JPQL

I'm a newbie, so this is a pretty fundamental question. I'm not sure if there is a bi-directional relationship between the objects in memory and ObjectDB.  I know I can modify the objects and use persist() to write them to the database.  But does running a JPQL update or delete alter the in-memory objects? There are cases where the JPQL syntax is more expressive than operating on a collection, but I'm not sure if that will alter my program state.  Will it? Thanks, Lee  ... ObjectDB.  I know I can modify the objects and use persist() to write them to the database.  But does running a JPQL update ...