Unzip the andromda-ejb.jar file somewhere. In the templates directory there is a file "EntityBean.vsl". You change this to generate the code however you want, then rebuild the andromda-ejb.jar. The easiest way is to change your build.properties to use this jar file instead of the one in the AndroMDA home.
Regards, David Wann. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ìàêñèì Ïåòðàøåâ Sent: Friday, 20 June 2003 2:42 AM To: [EMAIL PROTECTED] Subject: [Andromda-devel] Autogeneration of primary key Hello, all! I have entity bean with attribute "id": Integer wich is primary key. Catridge for ejb generate for me the following code: public java.lang.Integer ejbCreate (java.lang.double balance) throws javax.ejb.CreateException { String primaryKey = new java.rmi.server.UID().toString(); setId (primaryKey); return null; // should not return primaryKey for CMP: see EJB spec, // chapter 10.5.2 "Bean ProviderТs entity bean instanceТs view" } Questions: 1. In compile time I receive error on line: setId (primaryKey); (it's obvious, because property "id" has Integer-type, but String) 2. but I have and another problem - I would like to use db-server (and app-server) vendor specific way for generation of primary key in case Integer or Long primary key. I mean, for example, sequences for Oracle or autoincrement engine for other db... How I have to define this? Thank you. With best regards, Maxim Petrashev Sr. J2EE Developer Database Technologies Department LUXOFT, IBS Group of Companies http://www.luxoft.com ------------------------------------------------------- This SF.Net email is sponsored by: INetU Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php _______________________________________________ Andromda-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/andromda-devel ------------------------------------------------------- This SF.Net email is sponsored by: INetU Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php _______________________________________________ Andromda-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/andromda-devel
