Read « Field « JPA Q&A





1. Read ENUM and its fields from a database (JPA)    stackoverflow.com

I have a model object that's in fact an enum with fields and getters:

@Entity
public enum Type {
   TYPE1, TYPE2, TYPE3, TYPE4;

   @Column
   private Long id;
 ...

2. Problem with reading field in Hibernate    coderanch.com

I am trying to do a simple query in HQL but I cannot figure out what is the cause of this error message. My flow is PowerDesigner->Generate SQL->Middle Gen->HBM2Java. The error message I am getting looks like this: xception : org.hibernate.QueryException: could not resolve property: title of: roverlook.Videosessionmediamapping [SELECT vs from roverlook.Videosession vs WHERE vs.videosessionmediamappings. media.title=''] at org.hibernate.persister.entity.AbstractPropertyMapping.throwPropertyException(AbstractPropertyMapping.java:43) at org.hibernate.persister.entity.AbstractPropertyMapping.toType(AbstractPropertyMapping.java:37) at ...

4. Reading an NTEXT field    forum.hibernate.org

Hello, I have a problem trying to read a NTEXT field from a SQLServer database using the jTDS driver. This field contains a Excel file that was written as a byte array. Initially I mapped the corresponding field to the types 'string' and the property was defined as java.lang.String. The field was read and store in the String property, but when ...

6. Not able to read newly added field    forum.hibernate.org