Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JBoss User »

Re: [JBoss-user] Postgres + JBoss 3.2.1 + CMP

Mykola A. Nickishov

2003-09-10

Replies:

* Alexey Loubyansky <loubyansky@(protected)]:

> /**
> *
> * @jboss:entity-command name="postgresql-fetch-seq"
> */

I use pk-sql command:

/**
* @jboss.entity-command
*     name="pk-sql"
* @jboss.entity-command-attribute
*     name="pk-sql"
*     value="SELECT nextval('persons_seq')"
*/

> public abstract class ChildCMPBean
>   implements EntityBean
> {
>   /**
>   * @ejb.pk-field
>   * @jboss.persistence auto-increment="true"
>   */
>   public abstract Integer getId();

and

/**
* @ejb.persistence
* @ejb.pk-field
* @ejb.interface-method
*/

public abstract Integer getId();
             

> Check that 3.2.1 has postgresql-fetch-seq command in
> standardjbosscmp-jdbc.xml
>
> Matthew Hixson wrote:
> >Is anyone on the list currently using JBoss 3.2.1 with CMP and Postgres
> >7.3.x? I am having a problem where JBoss wants to execute SQL inserts
> >with 'null' as the primary key of the record where I would rather
> >Postgres create the primary key for me.
> > I've seen posts such as this one:
> >
> >http://archives.postgresql.org/pgsql-performance/2003-02/msg00062.php
> >
> >So it sounds to me like people have been doing this since the JBoss
> >3.0.x days.
> > Any help on getting JBoss to not put the primary key into the SQL
> >statement would be greatly appreciated.
> > Thanks,
> >  -M@

--
The shortest distance between two puns is a straight line.


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
JBoss-user@(protected)
https://lists.sourceforge.net/lists/listinfo/jboss-user


©2008 junlu.com - Jax Systems, LLC, U.S.A.