gorm - grails, loading domain from db when fields contains null causes setters to fail -


this problem fields declared double , null in database. using findallby receive list fails if of fields null. tried changing type double problems when arithmetics on them. if value null double can't decide converter should use. don't know if there way convert nulls in domain before set. example of error:

caused by: org.hibernate.propertyaccessexception: null value assigned property of primitive type setter of com.buffer.prodbuffer.makeinquiry 

you should use double in entities/domains; unless have nullable: false constraint @ work, it's practice, nonetheless.

however, need handle null in calculations, making 0 or 1, know better. more suggestions, post code snippet.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -