-->
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.  [ 1 post ] 
Author Message
 Post subject: Relationships with annotations
PostPosted: Tue Oct 14, 2014 8:39 pm 
Newbie

Joined: Tue Oct 14, 2014 8:27 pm
Posts: 1
I am new user of hibernate 4.3.6. Got some basic relationship code working, but struggling with multiple relationship with same table.

Consider usual Person and Address example. A person can have multiple addresses, onle one if them is current. I want to declare relationships on between these two tables. First one is for current address which states iscurrent field of address table is true. Other is for all addresses including current one. Based on what I have read/searched so far, it looks like this is possible using filters, but not sure how to get it working.

Ideally all relations will be lazily loaded

So far, I have managed to save data and get current address from person, but my all address relation is failing. No matter what I do, all addresses field is not being read.


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

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.