ObjectDB ObjectDB

Internal Website Search

1-10 of 17 resultsRefresh

Should derived fields of an EmbeddedId be manually maintained by app code?

@EmbeddedId, am I responsible for maintaining the derived fields of the @EmbeddedId? I could not find ... "ECompoundKeyMapSubItem", identified by their keys. The embeddedId for the item class, ECompoundKeyMapItemId ... ") annotation. Likewise the ECompoundKeyMapSubItem class has a PK which is an embeddedId

Can't modify @EmbeddedId in ObjectDB Explorer

Hi! There is entity Journal with @EmbeddedId JournalId. Id's content can't be seen/modified from ObjectDB Explorer from its class. Ok, I get this. It's an @EmbeddedId, so it should depend only on its parent. Problem: id's content can't be modified through its parent neither. Scenario: open db in

Efficient query on EmbeddedId

Hi! I have an entity class with an @EmbeddedId (field1 int and field2 int). Based on the manual, I understand that making a query just on entity.id.field1 is efficient. Of course, making a query containing the whole EmbeddedId is the ideal case, and I use it, but I need more use cases. My question

EmbeddedId with Generated field value

; } ********* Solution 2 ********* @Entity public class A { @EmbeddedId private CompositePK pk


javax.persistence Annotation EmbeddedId Target: Fields (including property get methods) Applied ... . There must be only one EmbeddedId annotation and no Id annotation when the EmbeddedId annotation is used ... within the embeddable class. The MapsId annotation may be used in conjunction with the EmbeddedId annotation to specify

JPA Primary Key

an embeddable class: @Entity public class Project { @EmbeddedId ProjectId id ... that is annotated with @EmbeddedId and contains an instance of that embeddable class. When using this form ... query run performance: @Entity public class Event { @EmbeddedId EventId id

JPA Annotations for Fields

Reference (JavaDoc) of JPA 2 field annotations, including @Basic, @Embedded, @EmbeddedId, @Version, @Transient, @Enumerated, @MapKeyEnumerated, @Temporal and @MapKeyTemporal.

ObjectDB Object Database Features

a @EmbeddedId field. Primary Key Data Types Primitives (boolean, byte, short, char, int, long, float and double


a ManyToOne or OneToOne relationship attribute that provides the mapping for an EmbeddedId primary key, an attribute within an EmbeddedId primary key, or a simple primary key of the parent entity ... ; ... } // dependent entity uses EmbeddedId for composite key @Embeddable


; ... } Example 3: @Entity public class PropertyRecord { @EmbeddedId

Getting Started

ObjectDB is very easy to use. Follow the Getting Started Tutorial and the Quick Tour manual chapter and in minutes you may be able to write and run first Java programs against ObjectDB.

Prior knowledge or experience in database programming (SQL, JDBC, ORM, JPA, etc.) is not required, but some background in using the Java language is essential.

Need Help?

  1. Search ObjectDB website
  2. Read the FAQ
  3. Follow the Tutorials
  4. View or post in the forum
  5. Search or file an issue
  6. Contact support