-->
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: Join to a table which name is stored as a data base column
PostPosted: Wed Jan 29, 2014 5:37 am 
Newbie

Joined: Wed Jan 29, 2014 5:19 am
Posts: 2
I just think how hibernate is able to join a table which name is stored as a variable in a column.
Example (this is just an example! i know this example is ridiculous, but assume there might be similar
cases which make more sense!)

Assume we have 3 tables defined:

Address
--------
column1 : name
column2 : table_name

Home
-----
column1 : street

Office
------
column1 : street

Content of Address e.g.

Address
---------------------
name | table_name
---------------------
Bert | Home
Simpson | Office

Is it possible in Hibernate to join by "variable name"??

Thanks a lot! Klaus



-> i just recognized that this could be implemented by @any tags
see http://www.jroller.com/eyallupu/entry/hibernate_the_any_annotation

-Klaus


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.