• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Query about Composite keys - Hibernate

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using composite key in my mapping file.
But after querying to DAO its returning me null records. the count of records retrieved is correct.
please help asap.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please TellTheDetails. We can't help you if you don't.
 
V Patil
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
we are generating POJO classes using My Eclipse.
Table which is not having primary key is autogenerated by eclipse as a composite key while generating POJO files. i.e. a id class is generated
say for eg
DVLMASTER.java
DVLMASTERID.java
AbstractDVLMASTERID.java
AbstractDVLMASTER.java
and the mapping file .

i m using dao file also , in which findbyproperty is present .after using that
i m gettn result count correct, but the value is null.

l_objDoccode = dao1.findByProperty("id.division","MS");

System.out.println("doc code object size is"+l_objDoccode.size());

List DoccdeLst = new ArrayList();

for(int i =0; i<l_objDoccode.size();i++)
{


AccDvlDivMaster l_objAccDvlDivMaster =(AccDvlDivMaster)l_objDoccode.get(i);

l_objDoccode size is 52 .
but null .
 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What does findByProperty do?
 
V Patil
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
find by property
is this method

which is in DAO class parameters are
propertyName which is column name in pojo class and Object. n e more inform ation req?
please help its urgent!!!

[ Edited to use code tags - Paul Sturrock ]
[ October 16, 2008: Message edited by: Paul Sturrock ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic