From: Mark W. <mor...@SM...> - 2002-08-16 10:14:22
|
Hi all... I seem to have a problem with assigned id generators. Suppose I have: <class name="eg.Foo" table="foo"> <id name="id" type="long"> <generator class="assigned" /> </id> <property name="name" /> </class> My code is doing: Foo f = new Foo(); f.setId(100); f.setName("test"); session.save(f); And I'm getting: cirrus.hibernate.id.IDGenerationException: IDs for this class must be manually assigned I don't understand why I'm getting this error, since I do assign an id. Am I missing something? Thanks, -Mark |