Hi,
does anyone knows if its possible to use CayenneForm with an DataObject
that has more than one PK? (complex key)
I was trying to set up CayenneForm with an DataObject that has PK
consisting of 2 columns (detail table).
The error or problem occurs after posting a form in method
public void render(HtmlStringBuffer buffer) {
applyMetaData();
// Ensure OID hidden field is set if available after a commit
if (dataObject != null
&& isPersistent(dataObject)
&& StringUtils.isEmpty(oidField.getValue())) {
Object pk = DataObjectUtils.pkForObject(dataObject);
oidField.setValueObject(pk.toString());
}
super.render(buffer);
}
with an error
org.apache.cayenne.CayenneRuntimeException: [v.3.0.2 Jun 11 2011
09:52:20] Expected single column PK, got 2 columns
Is there any solution to this other than not using Cayenne ORM?
Ivan