On Sat, 2002-12-07 at 19:12, [EMAIL PROTECTED] 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 ([EMAIL PROTECTED])
Java Developer



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to