Announcement Announcement Module
Collapse
No announcement yet.
addon-dbre issues Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • addon-dbre issues

    1. CLOB suport:

    Why we use byte array for the CLOB? EntityManager does not like it. It supposed to be String annotated as Clob:

    addon-dbre\src\main\java\org\springframework\roo\addon\d bre\model\ColumnType.java

    Code:
    CLOB(Types.CLOB, new JavaType("java.lang.Byte", 1, DataType.PRIMITIVE, null, null)), 
    ->
    CLOB(Types.CLOB, JavaType.STRING_OBJECT),
    addon-dbre\src\main\java\org\springframework\roo\addon\d bre\DbreMetadata.java.getField()
    add:

    Code:
    		
    // Add @Clob if applicable
    if (column.getType().getTypeCode() == ColumnType.CLOB.getTypeCode()) {
      AnnotationMetadata clobAnnotation = new DefaultAnnotationMetadata(new JavaType("javax.persistence.Lob"), new ArrayList<AnnotationAttributeValue<?>>());
      annotations.add(clobAnnotation);
    }
    btw, why we do not have normal equals for ColumnType enum?


    2. Character support:

    EntityManager wants to see Character in case corresponding database column has length of 1. Now we use 'String'. Why? Does not work. Should be:

    addon-dbre\src\main\java\org\springframework\roo\addon\d bre\model\ColumnType.java
    Code:
    CHAR(Types.CHAR, JavaType.STRING_OBJECT), 
    ->
    CHAR(Types.CHAR, JavaType.CHAR_OBJECT),
    Only with these patches applied "database reverse engineer" works fine with Oracle DB. Not sure about others.

  • #2
    Why we use byte array for the CLOB? EntityManager does not like it. It supposed to be String annotated as Clob:
    Please raise a Jira issue and I will look at it.

    Comment


    • #3
      https://jira.springsource.org/browse/ROO-1395 created for CLOB support and https://jira.springsource.org/browse/ROO-1396 for CHAR support.
      Last edited by Alan Stewart; Sep 15th, 2010, 05:50 AM.

      Comment


      • #4
        Support added for java.sql.Types.CLOB and java.sql.Types.CHAR fields. Please get the code from Git and try out.

        Comment


        • #5
          Roo>git clone git://git.springsource.org/roo/roo.git
          Initialized empty Git repository in /roo/.git/
          fatal: read error: Connection reset by peer
          hmm...will try later

          Comment


          • #6
            Got the copy of the master via website tar.gz. works. good to go.

            Comment

            Working...
            X