-->
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: Can I map an object, select view but update table?
PostPosted: Thu Mar 08, 2007 2:11 pm 
Newbie

Joined: Thu Mar 08, 2007 1:58 pm
Posts: 6
Currently I have a table and columns mapped to class objects

<class name=com...patient table=patients dynamic-update=true mutable=true ..
<component name=myRef class=com...refDisplay ..>
<property name=id column=myRefFieldId />

After mapping an object I lookup all the reference ids in a hashmap and populate the object.

What I would like, on retrieving the data is to use a view or otherwise join to the reference fields

e.g.
select r1.display as sex, p.sex_id, r2.display as race, p.race_id, ...
from patients p, reference r1, reference r2
where p.sex_id = r1.reference_id
and p.race_id = r2.reference_id
...

This is more efficient than populating the object after selecting a row.

However if I was updating a row I guess I wouldnt want it to use the view or join to reference.

Is this possible?


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.