Hibernate version: 3.0.5
Normally I use lazy="true", but I've been playing with lazy="proxy" (the default) recently (in case we ever decide to rejoin the human race and upgrade our copy of hibernate). I've just noticed that the id of an object loaded via a many-to-one lazy="proxy" association is never filled in (unless the object was already in the cache, of course). All the other members are fine, it's just the id field.
Has anyone else encountered this? What causes it? What's the solution? Does anyone else even remember 3.0.5?
FWIW, all the id fields I've checked so far have been strings mapping to SQLServer uniqueidentifier columns (GUID/varchar(36)). I haven't included any mapping, because all sorts of different mappings cause exactly the same problem. Only thing in common is many-to-one lazy="proxy".
_________________ Code tags are your friend. Know them and use them.
|