Blackbrrd wrote:
I am as I mentioned earlier reverse-engineering a database with 600+ tables and would like to use the toString... I assume I would have to add the use-in-tostring value true to all the columns in all the tables?
To have that toString() method I would have to write that meta tag 6000 times or something...
Just write it once in property.hbm.ftl and you should be fine ;)
Quote:
It would be really nice if you could just set a global value or something makeing all columns appear in the toString method, and you could set the meta tag to false if there were some columns you didn't want to have in the toString method...
that is what the meta attribute support should do.
Quote:
About the primary key not beeing available except if you use assigned id's, well.. we do actually have quite a few situations where you know the primary key of an object, but you haven't loaded the object into memory...
so do:
x.setY(session.load(Y.class, 42));
Anything else has bad side effects and thus i won't put it into the tool as an easy thing to do ;)
Quote:
Maybe not a good solution, but it would be nice to be able to have the constructor I mentioned anyway...
The templates are free for you to edit and enhance to do just this.