On the "header" XDoclet tags: /** * * @ejb:bean * name="Message" * type="CMP" * view-type="local" * schema="Message" * cmp-version="2.x" * primkey-field="id" * * @ejb:value-object * name="Message" * match="*" * * @ejb:transaction * type="Required" * * @ejb:persistence * table-name="Message" * * @ejb:pk class="java.lang.Object" * * @jboss:persistence * datasource="java:/jitikDS" * datasource-mapping="mySQL" * * @jboss:entity-command * name="mysql-get-generated-keys" * * @jboss:unknown-pk * class="java.lang.Integer" * auto-increment="true" * jdbc-type="INTEGER" * sql-type="INT(11)" * */
On the pk-key field methods: /** * @ejb:persistence * @ejb:pk-field * * @jboss:column-name name="id" * @jboss:persistence auto-increment="true" * */ public abstract Integer getId(); public abstract void setId(Integer id); Make sure you have a recent version of everything. I'm not sure about which versions you have to use but this is somehow like a recent feature. On Wed, 2003-09-24 at 07:19, Lev Brouk wrote: > Hi, > > Sorry if I am beating the dead horse here, but I wasn't able to find a > working example in the last day or so. > > I am trying to create an entity ejb using an integer autoincrement > column of a mysql database, and so far haven't been able to > successfully do it with XDoclet. > > The culpirit of the problem seems to be the ValueObject that XDoclet is > generating for me - it wouldn't compile no matter how I am declaring > the PK (Object, Integer, generate or not). > > Can someone please post an example of how it can be done? > > I am using XDoclet 1.2b3, MySQL 3.23, JBoss 3.2.1 on MacOS X 10.1 with > 1.3 jvm > > Thanks in advance, > > Lev > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > xdoclet-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/xdoclet-user -- Eduardo H. Ramírez Rangel Centro de Sistemas Inteligentes 5o. Piso Torre Sur CETEC, ITESM Campus Monterrey (52-81) 8328-4380, 83-58-2000. Ext. 5134 ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user