• 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

hibernate entity gets null value for nullable integer field

 
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 Spring Java
  • 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?
 
It's a tiny ad only because the water is so cold.
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic