Read « Field « JPA Q&A

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

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

public enum Type {

   private Long id;

2. Problem with reading field in Hibernate

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( at org.hibernate.persister.entity.AbstractPropertyMapping.toType( at ...

4. Reading an NTEXT field

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