About entities

forum_thread

Can a Set<E> be a foreign key?

I have two classes, Cell and Character.  Basically, the cell is like a room, and contains a variable (private Set<Long> cellHeldCharacters;) which holds the IDs of the characters within the cell (The IDs are Primary Keys).  Can I use the Foreign Key annotation for the variable, or is it illegal/unrecommended to do it for a Set? For a better picture, I have: #1 2011-04-15 04:15 I have two classes, Cell and Character.  Basically, the cell is like a room, and contains a variable (privat ...

 
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: ... we supposed to do now to fix this as when quering those entities they always have a myId of zero!? We are NOT manipulating the ... Actually, we're only having one version of our entities for sure which are using a Long id. Anyway, as our databases ...

 
forum_thread

Object explorer cannot open odb file. ObjectDB many-to-many relationship

I created a data model to test many-to-many relationship with a link table as following (full code in attachement) #1 2011-11-24 15:38 I created a data model to test many-to-many relationship with a link table as following (full code in attachement ...

 
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 ... primary key. Are all broken references in other entities on this removed/persisted entity repaired again? best regards ...

 
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 #1 2016-05-25 09:54 Hi, I have a usecase where I need to write the updated entity version to the database before commiting th ...

 
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:... Hi, the manual states the following regarding config of Entities: http://www.objectdb.com/java/jpa/setting/entities : <cache ref = "weak" level2 = "0mb" /> ...

 
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? ... cannot be used with queries that return values rather than entities, so these queries are different. Could you please post the ... / > < / database>   <entities> <enhancement agent = "true" reflection = "warning" ...

 
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: ... to them containing quite long Strings and me loading ALL entities of the database on application startup (swing app). Yet they don't ... fields. But still keeping the large strings in separate entities may be more efficient, if usually these strings are not required. ...

 
manual

Index Definition

Describes how to define indexes in JPA entity classes and explains how indexes are used in JPQL queries.... is thrown on commit (or flush) if different entities have the same value in a unique field (similar to how primary keys ... (or arrays of values in composite indexes), in all the entities of that class (including subclasses). Every key is associated with a list of references to the entities that contain that value. Indexes require maintenance time and ...

 
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;   } Bug Version: 2.4.1 Priority: Normal Status: Closed Replies: 6 Type:  Bug ...