On 19/08/2005, at 8:04 AM, Jonathan Miller wrote:
The relationship are created straight out of the EOModeler's Java Generation Tool so I hope this is what you are asking for
/* Excerpt from License.java */
public String principalid() {
return (String)storedValueForKey("principalid");
}
public void setPrincipalid(String value) {
takeStoredValueForKey(value, "principalid");
}
public Number productId() {
return (Number)storedValueForKey("productId");
}
public void setProductId(Number value) {
takeStoredValueForKey(value, "productId");
}
1) Get rid of the above - primary/foreign key attributes shouldn't be found (in most cases) in your Java code. They're database artifacts...
2) open up EOModeler again, go to Tools > Table Mode, and
for ( each entity in your model ) {
for ( each primary || foreign key columns ) {
deselect them as class attributes <i.e., diamond key should be off>
}
}
3) Re-generate your Java files...
Then, as Chuck mentioned - EOF will handle these things automatically...