openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Simons <michael.sim...@optitool.de>
Subject Problem with @TableGenerator [OpenJPA 1.2.2]
Date Mon, 22 Jun 2009 13:48:17 GMT
Hello,

Here's my annotation:
    @TableGenerator(name = "pkGenSessionConfig", table = "jdo_keygen", pkColumnName =
"table_name", valueColumnName = "last_used_id", pkColumnValue = "session_config", allocationSize
= 10)
    @Id
    @GeneratedValue(strategy=GenerationType.TABLE, generator="pkGenSessionConfig")
    @Column(name="session_config_id", unique=true, nullable=false)
    private int id;

And here's the according SQL generated by OpenJPA:
Unknown column 'TABLE_NAME0' in 'where clause' {prepstmnt 32845046 SELECT LAST_USED_ID FROM
jdo_keygen WHERE TABLE_NAME0 = ? FOR UPDATE [params=(String) session_config]} [code=1054,
state=42S22]

Question: Where does OpenJPA take "TABLE_NAME0" from while pkColumnValue="table_name"

Kind Regards,
Michael

Mime
View raw message