About EmbeddedId

1-10 of 15Refresh
JPA Doc
93

javax.persistence.EmbeddedId

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
Manual
39

JPA Primary Key

an embeddable class: @Entity public class Project { @EmbeddedId ProjectId id ... with @EmbeddedId and contains an instance of that embeddable class. When using this form a separate ... performance: @Entity public class Event { @EmbeddedId EventId id; : } @Embeddable
Forum
34

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
Forum
28

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
Forum
28

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
Forum
27

EmbeddedId with Generated field value

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

ObjectDB Object Database Features

@Id fields or a @EmbeddedId field. Primary Key Data Types Primitives (boolean, byte, short, char
JPA Doc
13

javax.persistence.MapsId

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
JPA Doc
6

javax.persistence.AttributeOverride

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

JPA Composite Key make Object Db throws "Unexpected exception (Error 990)"

Book { @EmbeddedId BookId id; } @Embeddable Class BookId { Integer bookIdCountry ... MyEntity {         @EmbeddedId public MyEntityId id;     }          @Embeddable     public static