ObjectDB ObjectDB

Internal Website Search

1-9 of 9 resultsRefresh


javax.persistence Annotation MapKey Target: Fields (including property get methods) Specifies ... associated with it. The MapKeyClass annotation is not used when MapKey is specified and vice versa ... ="department") @MapKey // map key is primary key public Map getEmployees


Annotation Element javax.persistence.MapKey String name (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. If the primary key

JPA Entity Fields

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

JPA Annotations for Relationships

Reference (JavaDoc) of JPA 2 relationship annotations, including @ManyToMany, @ManyToOne, @OneToMany, @OneToOne, @OrderBy and @MapKey.

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

.MapKey; import javax.persistence.OneToMany; import javax.persistence.Persistence; import org.junit ... = "parent", orphanRemoval = true)   @MapKey(name = "childName")   private Map<String, ChildEntity

Merge with Parent/Child entities not possible

; import javax.persistence.MapKey; import javax.persistence.OneToMany; import javax.persistence ... = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy = "parent", orphanRemoval = true)   @MapKey

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

(mappedBy = "user") @MapKey     private Map<Assignement.PK, Assignement> assignements; } @Entity ... ") @MapKey     private Map<Assignement.PK, Assignement> assignements; } @Entity @IdClass


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

NullPointer when accessing persistent field

.ALL, mappedBy="z_component") @MapKey(name="z_schemeName") private java.util.Map<java.lang.String ... was being accessed. @OneToMany(cascade=CascadeType.ALL, mappedBy="z_aqera") @MapKey(name="z_registerId

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