About entity

forum_thread

NoSuchFieldError: __odbTracker on NetBeans 7.3 + JBoss 7.1.1

When using inheritance throw exception java.lang.NoSuchFieldError: __odbTracker on NetBeans 7.3 + Jboss 7.1.1, but works fine on NetBeans 7.3 + GlassFish 3.1    ... __odbTracker on NetBeans 7.3 + Jboss 7.1.1 @ Entity public class Person extends AbstractObject { ... ; } }     @ Entity public class City extends AbstractObject { ...

 
forum_thread

IDs of Entities suddenly became UUIDs?

Hi, We're having our system with ObjectDB 2.4.5 in production since this year April and it works just fine. However, now we've discovered that suddenly partial Objects in some DBs in production do have a UUID String as their id instead of Long which is of course causing a lot of troubles. Note that this even occurrs on the same "Table" -- some saved Entitities of same type do still have a Long ID, others a String UUID. Our Base-Entity everything inherits from is declared as usual with Long: ... have a Long ID, others a String UUID. Our Base-Entity everything inherits from is declared as usual with Long: @ ... of them having mixed Long and UUID String ids in the same entity type!?? Alex edit ...

 
forum_thread

persisting object with long[][] arrays of array

Hi, I have an object I am trying to persist (java) - It has several fields of type long[][]. It is taking very long to persist and sometimes never finish - it hangs on getTransaction().commit(); Here is the object: ... CascadeType ; import javax. persistence . Entity ; import javax. persistence . FetchType ; ... . OneToMany ;     @ Entity public class TESTObject implements Serializable { ...

 
forum_thread

Repair broken references in entities

Hello, it is possible to recover an entity that has been removed automatically by CascadeType.Remove. After cascade remove the removed entity will be persisted with the identical primary key. Are all broken references in other entities on this removed/persisted entity repaired again? best regards ... Hello, it is possible to recover an entity that has been removed automatically by CascadeType.Remove. After cascade remove the removed entity will be persisted with the identical primary key. Are all broken ...

 
forum_thread

Access entity version before commit transaction

Hi, I have a usecase where I need to write the updated entity id to the database before commiting the transaction: 1. Change entity field e.g. from a to b 2. Create a change entry in database containing the new version of the entity ... I have a usecase where I need to write the updated entity version to the database before commiting the transaction: 1. Change entity field e.g. from a to b 2. Create a change entry in database ...

 
forum_thread

Entity Management Config questions

Hi, the manual states the following regarding config of Entities: http://www.objectdb.com/java/jpa/setting/entities  : <cache ref="weak" level2="0mb" /> The <cache> element specifies settings of the two cache mechanisms for entities: #1 2010-12-20 07:36 Hi, the manual states the following regarding config of Entities: http://www.objectdb.com/java/jpa/setting/ent ...

 
forum_thread

Query results are not up to date for entities, not primitives

When using the CriteriaBuilder to query, the retrieved list are not refreshed according to the latest updates. But, when using the JPQL Query, the list are refreshed. What is the problem? ... the query mode, from CriteriaBuilder to JPQL or from Entity to Primitive. What´s now? ... in not being seen by queries : "Updating entity objects in the database using an UPDATE query may be slightly more ...

 
forum_thread

Problem with @Basic(fetch = FetchType.LAZY)

I have a class where two fields are annotated with @Basic(fetch = FetchType.LAZY) due to them containing quite long Strings and me loading ALL entities of the database on application startup (swing app) This class should hopefully demonstrate the problem: ... import javax. persistence . *;   @ Entity public class Sample { private String title ... that you want to load lazily - keep them in separate entity objects. For example, you can define an entity class, LargeString , ...

 
manual

Index Definition

Describes how to define indexes in JPA entity classes and explains how indexes are used in JPQL queries. Querying without indexes requires iteration over entity objects in the database one by one. This may take a significant amount of time if many entity objects have to be examined. Using proper indexes the iteration can be ...

 
issue

Super class' field access fails

I have a base class: public abstract class HotObject extends BaseObject {   private Integer activity;   protected HotObject() {     activity = 1;   }   public Integer getActivity() {     return activity;   }   public void setActivity(Integer activity) {     this.activity = activity;   } ... And I have an inherited class: @ Entity public class HotTag extends HotObject implements ... ( ) ; }   @ Entity public abstract static class A { ...