Looking at code generation output I feel I miss a couple of=20
constructors, one with the full set of properties, one with
only the non-null properties, that can be used to create a=20
new bean without using all the setters. Both constructors
should not contain the id in case it is generated by the
framework. Sitting on my disk I have an half baked patch
that creates those constructors, but I still have some=20
problems:
=2D sets miss then not-null attribute, so I cannot judge if
they are to be included in the minimal constructor or not
(the not-null attribute should be added to set, bag, ...)
=2D of course I'm not willing to maintain this pach-set outside
the CVS, so I will develop it further only if you like the
idea and are willing to accept my work... (the patch is
very small but it's annoying to keep it on par every time
a new hibernate release is out)
What do you think?
Best regards
Andrea Aime
|