-->
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: Attach view to object
PostPosted: Wed Jun 16, 2010 11:10 am 
Newbie

Joined: Thu Jun 04, 2009 10:02 am
Posts: 6
Hi all,

Say I have a table A with an identifier aId, and a view B consisting of a lot columns, among these also an aId. Since FK's arent supported in views, I cant directly attach B to A, in the common hbm.xml way.

What I would like to do is wheneven an object of type A is fetched, the corresponding row from B (with the same aId) is "attached" to A.

I have experimented a little with <sql-query> in the hbm file, but I cant seem to make it happen :)

Is this at all doable in hibernate?

/Cheers!


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.