Java’s transient
keyword is used to denote that a field is not to be serialized, whereas JPA’s @Transient
annotation is used to indicate that a field is not to be persisted in the database, i.e. their semantics are different.
More Related Contents:
- Hibernate Annotations – Which is better, field or property access?
- Do I need elements in persistence.xml?
- What’s the difference between JPA and Hibernate? [closed]
- Can someone explain mappedBy in JPA and Hibernate?
- How to annotate MYSQL autoincrement field with JPA annotations
- When to use EntityManager.find() vs EntityManager.getReference() with JPA
- Setting default values for columns in JPA
- Please explain about insertable=false and updatable=false in reference to the JPA @Column annotation
- @PreUpdate and @Prepersist in hibernate/JPA (using session)
- can someone please explain me @MapsId in hibernate?
- Hibernate bidirectional @ManyToOne, updating the not owning side not working
- JPA map collection of Enums
- No Persistence provider for EntityManager named X
- Use Enum type as a value parameter for @RolesAllowed-Annotation
- persistence.xml different transaction-type attributes
- JPA Multiple Embedded fields
- Sharing a persistence unit across components in a .ear file
- Inherited abstract class with JPA (+Hibernate)
- org.hibernate.MappingException: Could not determine type for: java.util.Set [duplicate]
- Difference between a “jta-datasource” and a ” resource-local ” datasource?
- PersistenceUnit vs PersistenceContext
- LOAD and CACHE application-scoped data with @Singleton and @Stateless
- Name attribute in @Entity and @Table
- Setting a JPA timestamp column to be generated by the database?
- JPA Criteria Tutorial [closed]
- What’s the difference between the IN and MEMBER OF JPQL operators?
- Why should anybody put annotations on the getters or setters when using JPA to map the classes?
- How to create join table with JPA annotations?
- How to auto detect entities in JPA 2.0
- How to map one class to different tables using hibernate/jpa annotations