EclipseLink / JPA Annotations – @AttributeOverride And @AssociationOverride

eclipse-thumbnail

At this tutorial we’ll introduce using of @AttributeOverride and @AssocationOverride that mentioned intentionally at the @MappedSuperclass tutorial. As you’ve remembered at @MappedSuperclass annotation tutorial, we’ve mentioned at the Database Design section the possibility of using @AttributeOverride and @AssociationOverride to override the attributes and associations that inherited from the mapped superclass. An entity can inherit a persistent entity state and […]

EclipseLink / JPA Annotations – @MappedSuperclass

eclipse-thumbnail

This tutorial will explain the using of @MappedSuperclass, that could be considered as an alternative choice for sharing a persistent entity state and mapping information. An entity may inherit from a super class that provides a persistent entity state and mapping information as we’ve seen previously in the @Inheritance tutorials. Unlike using of @Inheritance, the […]

EclipseLink / JPA Annotations – @Inheritance With Table Per Concrete Strategy

eclipse-thumbnail

The inheritance is one of the most scenarios that can be encountered once we’ve been coming into business field. Inside the Java Persistence API (JPA) The entities support inheritance, polymorphic, polymorphic associations, and polymorphic queries. Both abstract and concrete classes can be entities, and both of them can be annotated with the @Entity annotation, mapped as […]

EclipseLink / JPA Annotations – @Inheritance With Joined Table Strategy

eclipse-thumbnail

In the Java Persistence API (JPA) The entities support inheritance, polymorphic, polymorphic associations, and polymorphic queries. Both abstract and concrete classes can be entities, and both of them can be annotated with the @Entity annotation, mapped as entities and queried for as entities. Entities can extend non-entity classes and non-entity classes can extend entity classes, so […]

EclipseLink / JPA Annotations – @Inheritance With Single Table Strategy

eclipse-thumbnail

In the Java Persistence API (JPA) The entities support inheritance, polymorphic, polymorphic associations, and polymorphic queries. Both abstract and concrete classes can be entities, and both of them can be annotated with the @Entity annotation, mapped as entities and queried for as entities. Entities can extend non-entity classes and non-entity classes can extend entity classes, so […]

EclipseLink / JPA Annotations – @ManyToMany

eclipse-thumbnail

The Many-To-Many annotation is one of the most important annotations provided by the EclipseLink – JPA. It defines a many-valued association with ManyToMany multiplicity (See single-valued multiplicity and different kind of many-valued multiplicity). A newly concept has introduced such as (JoinTable) as well as a new annotation like (@JoinTable) when we are coming to introduce […]

EclipseLink / JPA Annotations – @OneToMany and @ManyToOne

eclipse-thumbnail

The OneToMany and ManyToOne annotations are two major JPA annotations that are used for defining two different kinds of associations. The OneToMany annotation define a many-valued association with one-to-many multiplicity, whereas the ManyToOne annotation defines a single-valued association to another entity that has many-to-one multiplicity. The Multiplicity concept seems ambiguous, but it simply tells you the […]

EclipseLink Tutorials

eclipse-thumbnail

EclipseLink is reference implementation for the Java Persistence API (JPA) specification. This project is maintained and supported by the Eclipse Open Source foundation. EclipseLink not only supports the JPA standards, it also supports the following open source standards: Java Persistence API (JPA) Java Architecture for XML Binding (JAXB) Java Connector Architecture (JCA) Service Data Objects […]

EclipseLink / JPA Annotations – @OneToOne

eclipse-thumbnail

OneToOne annotation is one of the annotations that are used for defining a single-valued association to another entity that has one-to-one multiplicity. The multiplicity concept seems ambiguous but it simply tells you the maximum and minimum allowed members of the set. It is a UML design concept for defining the association relationship, in one-to-one case […]

EclipseLink / JPA – com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column

eclipse-thumbnail

This post explains the common exception thrown in your eclipselink or JPA program when you miss the @JoinColumn annotation to refer the foreign key value. @JoinColumn is very important, cause it is used to indicate that there is a Joining at the annotated property, where the persistence implementation will take care of and consider the […]