About entities

forum_thread

10 classes limit

hey. i am a student. and we are learnning inheritance in JPA for my assiment i have 1 base class and 20 subclass in some kind of hierarchy (with all kind of mappings: SINGLE_TABLE, TABLE_PER_CLASS and JOINED). can i use the free version (it will count as 1 class?) or the 10 entity class limit won't allow it?   thank you, Liran. #1 2015-04-10 09:59 hey. i am a student. and we are learnning inheritance in JPA for my assiment i have 1 bas ...

 
issue

NPE when doing a find()

I added a simple User entity during Tomcat startup: class User {  @Id @GeneratedValue private long id; @Basic(optional = false) private String firstName; private String middleName; @Basic(optional = false) private String lastName; } Everything works fine until I restart the server, which does a em.find(User.class, 1).  Then this happens: Bug Version: 1.04 Priority: Normal Status: Fixed Replies: 1 Type:  Bug ...

 
api-jpa

Criteria Query From Elements

Reference (JavaDoc) of JPA query criteria FROM clause interfaces, including From, Root, Join and Fetch. The interfaces in this group are in use for setting a criteria query FROM clause. Criteria Query Variables The FROM clause  in JPA queries (as in SQL) defines the query variables. Query variables are represented in criteria qu ...

 
api-jpa

getMetamodel()

Return an instance of Metamodel interface for access to the metamodel of the persistence unit.(Method of javax.persistence.EntityManager)

 
forum_thread

Bidirectional OneToMany is slow on updated items

Hello, I have a problem with the following situation. I insert persons with addresses. In the first run, they are all new with a new address. It runs fast. In the second run, the persons are all loaded and got a second address. This seams to be much slower. The Entities are all enhanced by the javaagent (which you can see in the contained eclipse launch configuration) Is there any way to speed it up?       ... second address. This seams to be much slower. The Entities are all enhanced by the javaagent (which you can see in the contained ...

 
forum_thread

ObjectDB 2.x is working without any activation code

Hi, I downloaded the objectDB from the http://www.objectdb.com/object/db/database/download and then added the objectdb.jar in my classpath. I used the default objectdb.conf file present in the objectdb.jar file and it is working without any activation code.. Is it is bug in objectdb or it works without actionvation code also. I am saving some information into the some.odb file and reading the informatin without any problem. What exactly is the activation code for ? Thanks & regards, #1 2012-07-23 12:50 Hi, I downloaded the objectDB from the http://www.objectdb.com/object/db/database/download and then&n ...

 
api-jpa

PersistenceContext.unitName

(Optional) The name of the persistence unit as defined in the persistence.xml file.(Annotation Element of javax.persistence.PersistenceContext)

 
forum_thread

Cannot initialize db after inserting a java.util.List

Hi, I've spent some time trying to figure this out without success, so I'm asking for much appreciated help. I have an entity class like this: class Test { private List<String> list = new ArrayList<String>(); } I can persist and retrieve the obj just fine using standalone program, but whenever I access the db through a servlet container I get this error: objectdb.java.util.ArrayList cannot be cast to com.objectdb.spi.TrackableSysType This happens during EntityManagerFactory initialization. #1 2010-12-24 03:05 Hi, I've spent some time trying to figure this out without success, so I'm asking for much appreciated he ...

 
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  #1 2014-03-24 22:25 I'm a newbie, so this is a pretty fundamental question. I'm not sure if there is a bi-directional ...

 
api-jpa

javax.persistence.metamodel.SetAttribute

Instances of the type SetAttribute represent persistent java.util.Set-valued attributes.(Interface of JPA)