-->
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.  [ 2 posts ] 
Author Message
 Post subject: hibernate finder
PostPosted: Fri Jan 02, 2004 1:41 pm 
Newbie

Joined: Fri Jan 02, 2004 1:32 pm
Posts: 2
I have this scenario:

table A:

id - primary key
X - references table B

table B:
id - primary key

column X of table A references table B and is unique, not null in table A (many-to-one).

I want to know how I can map this in the .hbm.xml file with a corresponding finder method.

Can I use finder meta tag inside many-to-one for this scernario.
I tried this, but when it generates the .java file, the object type for table B is null, is passed as the third argument inside the finder method based on X.

Could you please help me here.

I need a findByX method which accepts session, object X and returns the list without any nulls.

Thanks,
splguy.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 15, 2004 9:10 am 
Expert
Expert

Joined: Fri Nov 07, 2003 4:24 am
Posts: 315
Location: Cape Town, South Africa
You need to detail the problem a little better if you want an answer, preferably by checking out: http://www.hibernate.org/160.html

What table is object X mapped to? Where are your mapping files.?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.