What the the scenario that you are having problems with? Did you persist and flush/commit any of the SofMigration Entities? Since they are generated ids I don't think they'll be in the Entity till you put it in the DB.
Perhaps turning on SQL trace openjpa.Log=SQL=trace will shed some light as to what is going on. Thanks, Rick On Wed, Aug 11, 2010 at 9:53 AM, nicolas13 <[email protected]> wrote: > > Hello, > > i've created a couple of entities with Eclipse's dali jpa tools, from my > Mysql (5.0.77) Database, with mysql 5.1.13 JDBC conenctor The issue is > that > i can get the values of every column except the primary key > (autoincremented > int 11). Can anyone please help me ? thanks > > i'm using openjpa 2.0.0 > > Entity code: > @Entity > @Table(name="SOF_MIGRATION") > public class SofMigration implements Serializable { > private static final long serialVersionUID = 1L; > > @Id > @GeneratedValue(strategy=GenerationType.AUTO) > @Column(unique=true, nullable=false) > private int idMigration; > > private int consumedMigration; > > @Column(nullable=false, length=256) > private String emailMigration; > > @Column(nullable=false, length=256) > private String pwdMigration; > > public SofMigration() { > } > > //snip getters and settings > > } > > Broker: > Query q = em.createQuery("SELECT mig FROM SofMigration mig"); >
