Discussion:
[Middlegen-user] When generating Hibernate mapping files, how can I get a version attribute correctly generated?
Hoylman, Bruce
2006-12-02 01:05:02 UTC
Permalink
Hello --

Hibernate supports version attributes for automatically versioning
persistent objects. Is there a way to get Middlegen to correctly
generate this attribute in the mapping files it generates from a prefs
file? Simply creating the column on the underlying table is
insufficient as Hibernate requires this attribute to specify some
additional configuration information in support of its specialized
versioning role.

Note that I am dynamically generating the Hibernate mapping files, i.e.
I am relying on Middlegen to interrogate the database and generate the
mapping files on demand rather than manually maintaining the Hibernate
mapping files. Thus I want to be able to generate a properly configured
version attribute via Middlegen.

Any suggestions would be appreciated.

Peace.
Konstantin Priblouda
2006-12-02 13:42:08 UTC
Permalink
Post by Hoylman, Bruce
Hibernate supports version attributes for
automatically versioning
persistent objects. Is there a way to get Middlegen
to correctly
generate this attribute in the mapping files it
generates from a prefs
file? Simply creating the column on the underlying
table is
insufficient as Hibernate requires this attribute to
specify some
additional configuration information in support of
its specialized
versioning role.
AFAIR, middlegen generates xdoclet-tagged java
sources.
thus,those attributes have to be supported by xdoclet.

I'm not sure wheter XD1 supports this, but XD2 does.



regards,

----[ Konstantin Pribluda http://www.pribluda.de ]----------------
Still using XDoclet 1.x? XDoclet 2 is released and of production quality.
check it out: http://xdoclet.codehaus.org



____________________________________________________________________________________
Cheap talk?
Check out Yahoo! Messenger's low PC-to-Phone call rates.
http://voice.yahoo.com

Loading...