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),add:addon-dbre\src\main\java\org\springframework\roo\addon\d bre\DbreMetadata.java.getField()
btw, why we do not have normal equals for ColumnType enum?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); }
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.javaOnly with these patches applied "database reverse engineer" works fine with Oracle DB. Not sure about others.Code:CHAR(Types.CHAR, JavaType.STRING_OBJECT), -> CHAR(Types.CHAR, JavaType.CHAR_OBJECT),


Reply With Quote