Instead of
Long noticeId key databaseColumn="NOTICEID" databaseType="BIGINT"
/Patrik
I can look closer when I'm at a real computer.
/Patrik
1. Thanks I had resolved UUID issue by specifying noticeid as key. But
Id column generated is not seems to be correct on DB2.
NOTICEID bigint generated by default as identity,
2. How to specify the length for Clob or Blob Column. I have Clob
column with different size , how to specify the clob column in
btdesign with length attribute?.
On Thu, Apr 5, 2012 at 6:19 PM, Mahmood Lebbai <mahmood...@connvertex.com> wrote:
1. Thanks I had resolved UUID issue by specifying noticeid as key. But
Id column generated is not seems to be correct on DB2.
NOTICEID bigint generated by default as identity,In Sculptor the id property has some very special meaning. It is always an autogenerated value. Used as primary key and foreign key relations. I think you will have big trouble trying to change that part. I would recommend that you use id as default, but then add noticeid as natural key, as you started. What is the problem with that, except that you get an extra column?
2. How to specify the length for Clob or Blob Column. I have Clob
column with different size , how to specify the clob column in
btdesign with length attribute?.
It seems there is room for optimizations and improvements handling IDs and LOBs.
It should be possible to use sculptor with legacy systems, so we
should take care of
column mappings and datatypes.
In your case a quick workaround could help you with the CLOB problem.
Add
generate.jpa.annotation.columnDefiniton=true
to your sculptor-generator-properties file.
This will add the database type definitions to all column annotations
(not optimal but it’s only a workaround).
Then add databaseType=”CLOB(999)” to your desired attributes.
The result is an annotation that looks like
@Column (…, columnDefinition=”CLOB(999)”)
As an alternative you can solve your problem by adding a hint (hint=”length=999”) to your
clob attributes and override
templates::domain::DomainObjectAttributeAnnotation::columnAnnotations
to make use of this hint.
What do you think about this ID definition.
Long id key databaseColumn="NOTICEID"
This will add a id attribute and map it to a column named NOTICEID.
It will not generate a uuid attribute. Instead it will use the existing id attribute.
(I know that is not the intention of the key attribute).
Regards, Oliver