From: <phr...@im...> - 2002-12-09 16:25:07
|
hi, On 08 Dec 2002 10:25:30 -0500, "Chris Winters" <cwi...@op...> said: > 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: i considered this approach (even though my pk class is not a composite). however, the problem is that i can no longer rely on hibernate to generate the PKs for me. that's why i was trying to use a UserType. so, is there a way to reuse the functionality in the hibernate PK generators when using a composite-id? thanks, viktor -- phr...@im... -- http://fastmail.fm - IMAP accessible web-mail |