Internal Website Search

1-9 of 9 results

JPA Entity Fields

from the inverse query results by specifying a selected key field using the MapKey annotation: @Entity public class Department { @OneToMany ( mappedBy ="department") @ MapKey ( name ="name") Map

javax.persistence.MapKey

JPA Annotation MapKey Target: METHOD, FIELD Implemented Interfaces: Annotation Specifies the map ... associated with it. The MapKeyClass annotation is not used when MapKey is specified and vice versa. Example 1: @Entity public class Department { ... @OneToMany(mappedBy="department") @ MapKey // map key

javax.persistence.MapKey.name

JPA Annotation Attribute in javax.persistence. MapKey String name default "" (Optional) The name of the persistent field or property of the associated entity that is used as the map key. Default: If the name element is not specified, the primary key of the associated entity is used as the map key

Why are my Map entries not stored?

= FetchType.EAGER, cascade=CascadeType.ALL, orphanRemoval=true) @ MapKey (name="state") @MapKeyEnumerated ... ? But I have to set "@ MapKey "? Or is this optional? itsme Martin Petzold You have 2 options: Not using ... ;further information is needed  by ObjectDB (so it should work also without specifying @ MapKey

Is it possible to remove parent/child entities without refresh?

.persistence.Id; import javax.persistence.ManyToOne; import javax.persistence. MapKey ; import javax ... ", orphanRemoval = true)   @ MapKey (name = "childName")   private Map children = new HashMap ();  

Merge with Parent/Child entities not possible

.persistence. MapKey ; import javax.persistence.OneToMany; import javax.persistence.Persistence; import javax ... , cascade = CascadeType.ALL, mappedBy = "parent", orphanRemoval = true)   @ MapKey (name = "childName

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

String code;     @OneToMany(mappedBy = "user") @ MapKey     private Map ... code;         @OneToMany(mappedBy = "project") @ MapKey   

javax.persistence.MapKeyClass

annotations ( OneToMany or ManyToMany ). The MapKey annotation is not used when MapKeyClass is specified

NullPointer when accessing persistent field

as follows; @OneToMany(cascade=CascadeType.ALL, mappedBy="z_component") @ MapKey (name="z_schemeName ... (cascade=CascadeType.ALL, mappedBy="z_aqera") @ MapKey (name="z_registerId")     private