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: Load entity through join
PostPosted: Tue Dec 05, 2006 8:55 am 
Newbie

Joined: Mon Dec 04, 2006 12:39 pm
Posts: 5
Hello

imagine the following class

Code:
public class Operation_Linking {
          private Integer id;
          private Integer productOperation_id;
         
          private Operation productOperation;
          //is it possible to load this object automatically?

          public Integer getId();
          public void setId(Integer id);

          public Integer getOperationId();
          public void setOperationId(Integer id);
}


could anyone help me with the question - i need productOperation object (property productOperation) to be loaded automaticaly when you retrieve Operation_Linking using a join query.

Important: i do not want to use <many-to-one> association here because
i would like to add new records to Operation_Linking table without creating referential records in Operations table. So i don't need foreign key constraints to be created - just need the property productOperation to be initialized with object using some kind of join or null (if no related data found in Operations).

Could anyone help me with it?


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.