-->
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: How to map by table name
PostPosted: Fri Sep 05, 2008 10:36 am 
Newbie

Joined: Fri Sep 05, 2008 9:58 am
Posts: 5
Hi,

I have a requirement to map two tables by table name. Example:

First table:

Table name: CUSTOMER
Fields: CUSTOMER_ID etc. etc.
....

The second table has a unique structure:

Table name: METADATA
Fields: METADATA_ID
TABLE_NAME
MODIFIED
CONTENT etc. etc.

A row from METADATA might look like

21, 'CUSTOMER', 1/1/2008, 'this is content'

Can I do a mapping so that when I get a row from CUSTOMER I can fetch from METADATA too? Silly db design, I know, but it's what I've got to work with, any help appreciated.

Hibernate version: 3.2.6GA

Name and version of the database you are using: Oracle 10g


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 09, 2008 7:40 pm 
Expert
Expert

Joined: Tue May 13, 2008 3:42 pm
Posts: 919
Location: Toronto & Ajax Ontario www.hibernatemadeeasy.com
I don't believe there's a mechanism for grabbing the metadata.

_________________
Cameron McKenzie - Author of "Hibernate Made Easy" and "What is WebSphere?"
http://www.TheBookOnHibernate.com Check out my 'easy to follow' Hibernate & JPA Tutorials


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.