-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Not getting the cascaded object in the result
PostPosted: Mon Mar 31, 2008 3:12 am 
Newbie

Joined: Mon Mar 31, 2008 3:03 am
Posts: 2
Location: India
Hi all,

I have a three way relationship between Document - Company - CompanyMaster.

Each document (Research document) can have multiple companies associated with it. Company can be primary or not-primary. This relationship is maintained in the Company table. And the company details are in the company master table.

When I do a query to get the all the Documents based on the date, I get all the document and inside that I have list of company objects and the details in the CompanyMaster object.

But when I do a company specific search, Say give me all document where Company is IBM, then I am getting only one Company object inside the document object, though this document has GOOG and MFST also as primary company.

Please let me know what is that I am missing here


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 31, 2008 6:37 am 
Senior
Senior

Joined: Mon Feb 25, 2008 1:48 am
Posts: 191
Location: India
I guess its working the way it is supposed to work. However, can you post your hibernate mapping file and the search criteria code that you use.

_________________
Sukirtha


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 31, 2008 6:52 am 
Newbie

Joined: Mon Mar 31, 2008 3:03 am
Posts: 2
Location: India
Thank you for the reply.

My issue is that the the document(D1) has IBM, GOOG and MFST as companies in it. And in the document_company join table I have three entries in the mapping. If I search for either IBM, GOOG or MFST, I should get the complete document(D1) with all the three company object.

But what is happening is, if I search for IBM, I am getting D1, but D1 has only one company object that of IBM. what happened to GOOG and MFST, it is also part of that document, isn't it? Why am I losing information about the main document? If I search for GOOG, I am getting only GOOG company object as part of the document and IBM and MFST are missing.

I would really appreciate if you have a solution for this.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 31, 2008 11:51 pm 
Senior
Senior

Joined: Mon Feb 25, 2008 1:48 am
Posts: 191
Location: India
Hi Anand,

I can understand what your problem is but don't know if I or anyone else can help unless you post your hibernate mapping file (.hbm.xml) file and the query or criteria that you use to search the document!

_________________
Sukirtha


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.