Results 1 to 6 of 6

Thread: addon-dbre issues

  1. #1
    Join Date
    Nov 2009
    Location
    Chicago, IL
    Posts
    16

    Default 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. #2
    Join Date
    Dec 2005
    Posts
    935

    Default

    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.
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

  3. #3
    Join Date
    Dec 2005
    Posts
    935

    Default

    Last edited by Alan Stewart; Sep 15th, 2010 at 04:50 AM.
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

  4. #4
    Join Date
    Dec 2005
    Posts
    935

    Default

    Support added for java.sql.Types.CLOB and java.sql.Types.CHAR fields. Please get the code from Git and try out.
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

  5. #5
    Join Date
    Nov 2009
    Location
    Chicago, IL
    Posts
    16

    Default

    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

  6. #6
    Join Date
    Nov 2009
    Location
    Chicago, IL
    Posts
    16

    Default

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •