Announcement Announcement Module
Collapse
No announcement yet.
org.hibernate.util.JDBCExceptionReporter - [SQL0205] Column VERSION not in table Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #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.

    Comment


    • #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;
      }

      Comment


      • #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" })

        Comment

        Working...
        X