-
Sep 16th, 2010, 09:53 PM
#1
org.hibernate.util.JDBCExceptionReporter - [SQL0205] Column VERSION not in table
Hi
I just downloaded roo 1.1.0M3 and then trying to create web application for an existing table,
I was able to built the application without problem, but when i am trying to run it, i get following error
ERROR org.hibernate.util.JDBCExceptionReporter - [SQL0205] Column VERSION not in table XREF_GLOBALID in TRS030.
I have added versionField = "" to my model, still i get this error.
what am i missing,
the table has following columns,
GLOBALIDID 1 9 0 B (key)
GLOBALIDCD 5 16 A
DESC 21 40 A
and my model looks like below
@Entity
@RooJavaBean
@RooToString
@Table(name = "XREF_GLOBALID")
@RooEntity(identifierField = "GLOBALIDID", identifierColumn = "GLOBALIDID", versionField = "", finders = { "findXrefGlobalIdsByGLOBALIDCDLike" })
public class XrefGlobalId {
@NotNull
@Size(max = 16)
private String GLOBALIDCD;
@NotNull
@Size(max = 40)
private String DESCRIPTION;
}
so what am i missing
And i have added
-
Sep 17th, 2010, 06:12 AM
#2
I had this problem too using existing tables that didn't have any version columns. What I did was to add a version field to my entity class annotated with @Version, but I also annotated it with @Transient. Seems to make Hibernate happy. You'll need to create the getters/setters yourself too.
-
Sep 17th, 2010, 08:52 AM
#3
Thanks I added, following line of code and it worked fine
@Version
@Transient
private Integer version;
public Integer getVersion() {
return version;
}
public void setVersion(Integer version) {
this.version = version;
}
-
Sep 17th, 2010, 11:02 AM
#4
This is strange in spring roo 1.0.2
i could add ersionField = "" as below and it worked fine,
@RooEntity(identifierField = "GLOBALIDID", identifierColumn = "GLOBALIDID", versionField = "", finders = { "findXrefGlobalIdsByGLOBALIDCDLike" })
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules