Hibernate version: 2.1.6
hi,
i've got a question to composite-ids ... no panic, i know how to use them ;)
Unfortunately the legacy-db has some interesting structures ...
Therefore i've got a little problem with composte-ids and my question might be a little 'strange' :)
Am i right, that hibernate tries to load an object if only some values of the composte-id are different from 'null'?
For example:
Code:
<composite-id ...>
<key-property name="a" ..../>
<key-property name="b" ..../>
</composite-id>
There is a value for 'a' in the db, but not for 'b' ... (a=5, b=null).
Will hibernate try to load the object?
I think hibernate tries to do this ... but will fail ... (my tests let me think this way).
Is there a possibility to configure hibernate, that an object referenced e.g. via 'many-to-one' won't be loaded if not all parts of the composite-id contains a value different from 'null'?
I now that this is a 'strange' question ... and something like that shouldn't happen ... but i've got such an similar (example is reduced to the min) situtation and need a 'nicer' solution than i have at the moment ...
thx!
curio