Hi,
I'm using Hibernate 3.3.2.GA with an Oracle 10g database. In my Oracle table, "USER_LOGINS", I have a column, SUBVENDOR_ID, that can be NULL, but if it contains a number, that would link to the primary key of another table, named "SUBVENDOR".
However, right now the Subvendor object is not getting loaded into my UserLogin model. I suspect my annotation can be off. Can you provide some suggestions to make it work? Below is my Java code, - Dave
Code:
@ManyToOne
@JoinColumn(name = "subvendor_id")
private Subvendor subvendor;
...
/**
* Getter for property <code>subvendor</code>.
*
* @return Value of property <code>subvendor</code>.
*/
public Subvendor getSubvendor() {
return subvendor;
}
/**
* Setter for property <code>subvendor</code>.
*
* @param subvendor New value of property <code>subvendor</code>.
*/
public void setSubvendor(Subvendor subvendor) {
LOGGER.debug("setting subvendor:" + subvendor);
this.subvendor = subvendor;
}