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?