Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

two classes mapped with same entity name

 
nitin pokhriyal
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am having a very big table some 50 column or so on it and i cannot break that table. So i decided to break my hibernate class into 2 object
1. Customer(name, custnum, id)
2. Customer address(address)




The reason is because i want to show address only if asked for otherwise it will load data into memory.hibernate mapping goes



customer dao is



customeraddressdao is



TEST CLASS

The problem i face if i run Customer returns 6 result and custadd return 3 only. i was wondering why customer results 6 instead of 3 record which is actual count in db.

 
nitin pokhriyal
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
anybody has any idea or shd i try different approach to this problem
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!