| Author |
Query about Composite keys - Hibernate
|
V Patil
Ranch Hand
Joined: Oct 04, 2008
Posts: 36
|
|
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.
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
|
Please TellTheDetails. We can't help you if you don't.
|
JavaRanch FAQ HowToAskQuestionsOnJavaRanch
|
 |
V Patil
Ranch Hand
Joined: Oct 04, 2008
Posts: 36
|
|
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
Joined: Apr 14, 2004
Posts: 10336
|
|
|
What does findByProperty do?
|
 |
V Patil
Ranch Hand
Joined: Oct 04, 2008
Posts: 36
|
|
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 ]
|
 |
 |
|
|
subject: Query about Composite keys - Hibernate
|
|
|