Internal Website Search

1-10 of 18 resultsRefresh

javax.persistence.IdClass

IdClass Target: Classes Example: @IdClass(com.acme.EmployeePK.class) @Entity ... class="name">IdClass/value" title="Annotation Element of javax.persistence

IdClass.value

Annotation Element IdClass" title="Annotation in javax.persistence">javax.persistence.IdClassClass value Primary key class Since: JPA 1.0

JPA Primary Key

IdClass">@IdClass(ProjectId.class) public class Project ... a special ID class that is attached to the entity class using the IdClass">@IdClass annotation. The ID class reflects the primary key fields and its objects

Posting Sample Code

, The project does not contain a persistence unit, An entity or IdClass class should implement the java.io.Serializable interface).

JPA Annotations for Classes

="IdClass"> ID classes are useful in representing composite primary keys as explained in

javax.persistence.metamodel.EntityType

embedded id; returns false for an idclass. Returns: boolean

hasSingleIdAttribute()

for a simple id or embedded id; returns false for an idclass. Returns:

javax.persistence.metamodel.MappedSuperclassType

true for a simple id or embedded id; returns false for an idclass.

MapKey.name

key. If the primary key is a composite primary key and is mapped as IdClass

javax.persistence.MapKey

is used as the map key. If the primary key is a composite primary key and is mapped as IdClass