chlol wrote:
i try to get the comment by using pojo.getTable().getCommen(),but unsuccessful in the template,
I assume you mean pojo.getTable().getComment() ?
If it is not there then the jdbc driver or metadatadialect did not pick it up.
Quote:
and by the hibernate tools,i can generate SerialVersionUID for the model?
We do not generate serialVersionUID because it is not something you should do lightly.
See
http://opensource.atlassian.com/project ... se/HBX-964 for the discussion, i'll paste my previous replies for this:
"So why do I not go and add serialVersionUID to the generated entities ?
A) by implementing Serializable you just indicate that this object should be able to serialize to a stream, nothing more - nothing less!
B) by adding a serialVersionUID you are indicating much more, namely that this class is serializable *across* different versions of it - and note what eclipse generates is as far as I know exactly the same thing that the vm would do anyway, and hence why have that extra line ?
C) serialVersionUID=1 is *wrong* since the same class can change over time and the id won't be the same.
So what are the options:
Either we generate the full serialversionUID based on class signature but that implies B and that is just not true.
Or we remove the implements serializable, but what does that statement do besides making eclipse's bogus warnings light up and making all entities non-serializable by default ?
Feel very free to convince me of why eclipse's warning is correct and we should all add serialVersionUID even though I'm quite sure very few percent of those people adding the versionuid's doesn't actually do that."