-->
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: Can I use hibernate in this legacy scenario?
PostPosted: Sun Jul 05, 2009 4:45 pm 
Newbie

Joined: Sun Jul 05, 2009 4:37 pm
Posts: 2
I have 2 Tables with the following fields:

1) LR_Registry
- Parcel_No (unique)
- Date
- Status

2) LR_Properties
- Parcel_No
- Entry_No
- Description

There is a one-to-many relationship between Registery to Properties. The Parcel_No field is the key. The Database is AS400 and no primary key has been set on the LR_Properties table. The legacy apps just select * from LR_Properties where Parcel_No = the value of the LR_Registry.Parcel_No.

I have no idea how to set this up in Hibernate. Or, if it is even possible without making some changes to the Database. The AS400 is a very old system and it's unlikely I could request any modifications.


Top
 Profile  
 
 Post subject: Re: Can I use hibernate in this legacy scenario?
PostPosted: Sun Jul 05, 2009 7:42 pm 
Newbie

Joined: Sun Jul 05, 2009 4:37 pm
Posts: 2
OK, I have made some progress. I am able to get the parent table information (LR_Register). However, the relationship only returns the 1st record from the child table (LR_Properties). I know there are 4 children, in my test case. Furthermore, if I do a findAllByIdLike() to retrieve all the children from Groovy/Grails, I only get one child. Is Hibernate seeing only 1 child record or is it just ignoring the rest?


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.