long « Field « JPA Q&A





1. Cast MySQL float field to long    forum.hibernate.org

Hi, I found a proble with hibernate: I'm able to cast a float field into an integer in a hql query, but in some case the field contains a value greater than the capapility of integer (ex. 435.000.000.000) and I get an error on my log. I try to cast the field to long but hibernate throws an Exception. How can ...

2. String property to Long DB field    forum.hibernate.org

Hello, I want to map bean's string proeperty to db long column. Use case is: We have large data as string property in a java bean. And we want to save it in a long column in database. This can be achieved using clob type. But our existing system has support for long data type in db using JDBC, so we ...

3. cutting fields that are too long    forum.hibernate.org

hi, i know this is no fault of hibernate but maybe somebody knows are workaround using hibernate. i am using postgres (but this is certainly a 'feature' of many dbs). sometimes i get the following exception "value too long for type character varying" which happens exactly in cases when the value i want to save is longer than specified on the ...

4. hibernate can tell me witch field too long?    forum.hibernate.org

It seems unlikely that the Hibernate folks would parse exception messages to see if the columns referred to are mapped columns that it knows something about. On the other hand, they could try providing some form of validation that is based on the DDL of your database schema. If you think that would be a useful feature perhaps you should ask ...

5. How to insert 'null' in 'long' fields    forum.hibernate.org

Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp Hibernate version:3.1 Mapping documents: ...

6. Can not set java.lang.Long field to java.lang.Long    forum.hibernate.org

Hibernate version: 3.2.6.ga Name and version of the database you are using: MySQL 5.0 Full stack trace of any exception that occurs: 174711 [http-8080-2] FATAL de.actionlisteners.ExceptionHandler - processAction :: #{AdministrateReceipt.createPriceList}: javax.faces.el.Evaluati onException: /jsp/application/shoppinglist/createShoppingList.jspx @158,156 acti on="#{AdministrateReceipt.createPriceList}": javax.persistence.PersistenceExcept ion: org.hibernate.PropertyAccessException: could not get a field value by refle ction getter of de.businessobjects.Product.id javax.faces.FacesException: #{AdministrateReceipt.createPriceList}: javax.faces. el.EvaluationException: /jsp/application/shoppinglist/createShoppingList.jspx @1 58,156 action="#{AdministrateReceipt.createPriceList}": javax.persistence.Persis tenceException: ...