Tomasz,

If you check the hibernate-prefs.properties file (in the path specified by the prefsdir flag in the middlegen ant task) that is generated/updated by middlegen, you can find the keygenerator definitions for each table and alter them manually.

hibernate.tables.foo.keygenerator=sequence
hibernate.tables.foo.keygeneratorarg=seq_bar_id

An alternative (and much easier) way would be to run the Middlegen GUI and select the options in there.

Cheers

James.

Tomasz Kochanek wrote:

I am using PostgreSQl and sequences. I have tried to use midllegen to generate Hibernate mapping. The problem is that for all tables I get generator type="assigned" even if table is based on sequence.

According to hibernate docs it's not recommendedto use type assigned.
Is it ok? Is it possible to use sequences ??

Thanks for help

----------------------------------------------------------------------
Portal INTERIA.PL zaprasza... >>> http://link.interia.pl/f17cb



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
middlegen-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/middlegen-user




This e-mail is confidential. If you have received it in error, you are on notice of 
its status. Please notify us immediately by reply e-mail and then delete this message 
from your system. Please do not copy it or use it for any purposes, or disclose its 
contents to any other person; to do so could be a breach of confidence. Thank you for 
your cooperation. Please contact +44 (0) 20 72037300 or email [EMAIL PROTECTED] if you 
need assistance.


------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_idP47&alloc_id808&op=click _______________________________________________ middlegen-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/middlegen-user

Reply via email to