From: Gavin K. <ga...@ap...> - 2002-09-27 15:37:29
|
Damn! thats a tough one. I'm almost tempted to say that the best solution would be to implement the new cirrus.hibernate.persister.ClassPersister interface (in v1.1.1). This would be a decent solution if you just have a couple of tables like this and you don't need to use outerjoin fetching or the query language for those tables. (Well, actually you *could* probably get nice and familiar with Hibernate's internals and wire in outerjoin fetching and queries, I suppose.) Hold on.....somethings not right.....the IDENTITY column has to be unique of its own accord, right? ----- Original Message ----- From: "Chris Winters" <cwi...@op...> To: <hib...@li...> Sent: Saturday, September 28, 2002 1:38 AM Subject: [Hibernate] generated field as part of composite key > I just recently discovered Hibernate and have been extremely pleased > with it so far. It will probably be replacing our Entity Beans scheme > shortly. > > We're fitting Hibernate to an existing schema which is a little unusual: > every table in the system uses a composite key. I've created a composite > key object without a problem, but for some tables there's an additional > wrinkle as they use a generated field (e.g., IDENTITY in MS SQL) as part > of the composite key. > > I don't expect Hibernate would have native support for something like > this, so how would I go about implementing it? > > Thanks, > > Chris > > -- > Chris Winters (cwi...@op...) > Java Developer > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > hibernate-devel mailing list > hib...@li... > https://lists.sourceforge.net/lists/listinfo/hibernate-devel |