About identity

forum_thread

How to query for list of lists ?

Hi, I have a problem with constructing query, that gets only embedded list of integers from Entity. Here's the example : Query query = em.createQuery("SELECT i.filterDescription FROM Inspiration i"); List<List<Integer>> result = query.getResultList(); where Inspiration is like this : ... ( strategy = GenerationType . IDENTITY ) @ Basic ( optional = false ...

 
forum_thread

Extra uninitialised entities spawned on merge()

In the following, Element is a base entity class, with a bi-directional @ManyToOne-@OneToMany relationship Element owner - List<Element> ownedElements, and Example is a subclass entity with a relationship @OneToOne Element child. ... has a relationship to an object that has no persistent identity, the outcome of the merge operation is undefined. Some providers might ...

 
forum_thread

Jboss 6 persistence.xml startup error

Hi,   I'm trying to migrate a small EJB 3.1 project from Postgres to ObjectDb to test out feasibility, but I keep getting stuck on setting up the persistence.xml on JBoss 6 AS.   Here is my setup: ------- Start persistence.xml ------- #1 2011-04-04 07:38 Hi,  I'm trying to migrate a small EJB 3.1 project from Postgres to ObjectDb to test out feasibi ...

 
forum_thread

Searching lists within objects

Hi everyone,  I've a problem with searching on lists. I'm uncertain as to what the best form is, so I've created a maven project with all the classes and a unit test showing my issue. Pretty much I want to search using cb.isMember passing an object. This however does NOT work. I'm uncertain how the database is doing its matching, but it looks to me like it matches using objectids, which means you can only match isMember if you have a database object. This does not help as I'm never going to have the real object at search time. #1 2011-07-07 00:59 Hi everyone,  I've a problem with searching on lists. I'm uncertain as to what the best form ...

 
manual

Detached Entity Objects

Explains detached entity objects and how to work with detached objects in JPA, including merging them into an EntityManager.... into an existing managed entity object with the same identity (i.e. same type and primary key). If the EntityManager does not ...

 
manual

Deleting JPA Entity Objects

Explains how to use JPA to delete (remove) entity objects from the database. Existing entity objects can be deleted from the database either explicitly by invoking the remove remove(entity) EntityManager's method Remove the entity instance. See JavaDoc Reference Page... method or implicitly ...

 
forum_thread

Entity Update - Is the documentation up to date?

I'm working on my first ObjectDB project, and I just went back and reviewed some of the documentation.  Turns out I've been doing two things that http://www.objectdb.com/java/jpa/persistence/update suggests should not work. First, I've been modifying managed entities from outside an active transaction.  If I subsequently begin and commit a transaction, all my changes seem to be merged automatically. #1 2012-05-23 05:26 I'm working on my first ObjectDB project, and I just went back and reviewed some of the documentation.  ...

 
forum_thread

Remove an entity which attributes were changed - OptimisticLockException

We use an OSGi environment and we have three OSGi plugins.   In plugin A an entity is loaded and the entity is passed to plugin B. Plugin B changes an attribute on the entity. Plugin C removes the entity from the database. After commit the transaction an exception is caused with optimistic lock exception of the removed entity. If this operations on the entity are executed in only one plugin, it works well. #1 2016-04-14 13:06 We use an OSGi environment and we have three OSGi plugins.   In plugin A an entity is loaded ...

 
manual

Query Parameters in JPA

Explains how to use parameters (named parameters and ordinal parameters) in JPA queries. Query parameters enable the definition of reusable queries. Such queries can be executed with different parameter values to retrieve different results. Running the same query multiple times with different parameter values (arguments) is more efficie ...

 
forum_thread

Replication error on slave restart

I'm trying to enable replication on master server that was running with "recovery" enabled previously. I have copied database file to slave... and so on by manual. It worked fine. But if I restart slave server: #1 2014-03-01 15:53 I'm trying to enable replication on master server that was running with "recovery" enabled previously. ...