I am learning JPA from this tutorial.
I have some confusions in understanding the following annotations:
@Basic@Embedded>
In ORM mapping, the granularity of your object model can be finer than that of your database.
For example, you can have a Person record in your database which can be further decomposed to contain a reference to an Address object in your model. That's where the @Embedded and @Embeddable annotations come in. They simply state a relationship where one Entity can be stored as part of another.
As for the @Basic annotation, it's the simplest form of mapping which is applied by default to primitive types such as int and float and their wrappers as well as enums. More information can be had here: http://docs.jboss.org/hibernate/stable/annotations/reference/en/html/entity.html#entity-mapping-property