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");
-- 
View this message in context: 
http://openjpa.208410.n2.nabble.com/Cannot-get-primary-key-value-mysql-tp5412600p5412600.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to