jpaBasic mapping


@IdMarks field/column as the key of the entity
@BasicMarks requested field to mapped as a basic type. This is applicable to primitive types and their wrappers, String, Date and Calendar. The annotation is actually optional if no parameters are given, but good style would dictate to make your intentions explicit.
@TransientFields marked as transient are not considered for persistence, much like the transient keyword for serialization.


There always needs to be a default constructor, that is, the parameterless one. In the basic example, there was no constructor specified, so Java added one; but if you add a constructor with arguments, be sure to add the parameterless constructor, too.