• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Ron McLeod
  • Tim Moores
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Vijitha Kumara

hibernate entity gets null value for nullable integer field  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Below given is my hibernate entity.



I have a nullable Number field "DOC_FROM_NUMBER" in Oracle table DOCUMENT_P.

List<DocumentEntity > List = getEntityManager().createQuery("from PrefixEntity", DocumentEntity .class).getResultList();

Now, when running the above statement, the problem is i am getting only null values in the docFromNumber and docToNumber fields, it is a nullable field in the database.when i checked the table, these columns having values for some of the records.

Can any one suggest me some solutions...

thanks,
Nisha
 
Ranch Hand
Posts: 662
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I suppose you want to hit document entity table, but your query says "from PrefixEntity". Are you sure it is correct?
 
Live a little! The night is young! And we have umbrellas in our drinks! This umbrella has a tiny ad:
global solutions you can do at home or in your backyard
https://www.kickstarter.com/projects/paulwheaton/better-world-boo
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!