On Sat, 2002-12-07 at 19:12, phr...@im... wrote:
> how can one use an alternative class for primary keys (eg. MyPrimaryKey
> instead of a string)? I tried using a UserType for this purpose, but
> reflection fails with an IllegalArgumentException in
> AbstractEntityPersiser.setIdentifier.
Lookup the 'composite-id' property in the docs. Here's an example for
one of my objects:
<composite-id name="primaryKey"
class="com.optiron.readi.domain.CustomerPK"
unsaved-value="any">
<property name="custEntno"
column="cust_entno"
type="string"/>
<property name="custRscno"
column="cust_rscno"
type="string"/>
</composite-id>
Chris
--
Chris Winters (cwi...@op...)
Java Developer
|