Created a JIRA
https://jira.jboss.org/jira/browse/JBRULES-2325
Vijay
-----Original Message-----
From: rules-users-bounces@lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Kris Verlaenen
Sent: Tuesday, November 03, 2009 4:44 AM
To: Rules Users List; Vijay K Pandey
Subject: Re: [rules-users] Drools Flow BAM Module(5.1.0.M1) - Why primary key's
are of string/varchar type
Best might indeed be to update the id to a long instead of a String.
Also check out
http://opensource.atlassian.com/projects/hibernate/browse/HB-1113
Could you open a JIRA for this?
Kris
Quoting Vijay K Pandey <VPandey@mdes.ms.gov>:
> Thanks for the reply Kris.
>
>
>
> Before posting to the forum I tested with different name of
"id"
> column such as "primaryid". The name "id" is
not a problem as I have
> already generated the DDL for the tables of WSHT task and all the
> tables got created fine with "id" as the primary key
column with
> 'bigint' as the column type.
>
>
>
> So just to test it again I changed the 'id' column name to
> 'primaryid' - the error is same
>
>
>
> Error: Incorrect column specifier for column 'primaryid'
>
> SQLState: 42000
>
> ErrorCode: 1063
>
>
>
> When i converted the varchar to bigint for the 'id' column -
tables
> got created fine.
>
>
>
> Do let me know what do you think and how should I approach this
> issue?
>
>
>
> Vijay
>
>
>
> -----Original Message-----
> From: rules-users-bounces@lists.jboss.org
> [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Kris
> Verlaenen
> Sent: Monday, November 02, 2009 6:11 PM
> To: Rules Users List; Vijay K Pandey
> Subject: Re: [rules-users] Drools Flow BAM Module(5.1.0.M1) - Why
> primary key's are of string/varchar type
>
>
>
> Does changing the type of the id field from String to long fix
your
>
> issue? Because to me it seems that MySQL is not accepting
the name
> "id"
>
> as a valid column name? I guess changing the mapping so that
it uses
> a
>
> different column name could fix the issue?
>
>
>
> Kris
>
>
>
> Quoting Vijay K Pandey <VPandey@mdes.ms.gov>:
>
>
>
> > I am using Drools Flow BAM (5.1.0.M1) module to store the
> processes
>
> > instances for audit purpose. I generated the DDL with the
help of
>
> > Hibernate Tools against the MYSQL 5.1(INNODB)
>
> >
>
> > DDL for the 2 tables are given below -- the interesting part
is
> the
>
> > "id" column as "varchar" ---- this gives
error when we try to
> execute
>
> > the DDL against the mysql.
>
> >
>
> > create table AUDIT_NODE_INSTANCE_LOG (
>
> > id varchar(255)
not null auto_increment,
>
> > type integer,
>
> >
nodeInstanceId varchar(255),
>
> > nodeId
varchar(255),
>
> >
processInstanceId bigint,
>
> > processId
varchar(255),
>
> > DATE
datetime,
>
> > primary key
(id)
>
> > ) ENGINE=InnoDB;
>
> >
>
> > create table
AUDIT_PROCESS_INSTANCE_LOG (
>
> > id
varchar(255) not null auto_increment,
>
> >
processInstanceId bigint,
>
> > processId
varchar(255),
>
> > START_DATE
datetime,
>
> > END_DATE
datetime,
>
> > primary key
(id)
>
> > ) ENGINE=InnoDB;
>
> >
>
> > The error we get is
>
> >
>
> > Error: Incorrect column specifier for column 'id'
>
> > SQLState: 42000
>
> > ErrorCode: 1063
>
> > Error occured in:
>
> > create table AUDIT_NODE_INSTANCE_LOG (
>
> > id
varchar(255) not null auto_increment,
>
> > type integer,
>
> >
nodeInstanceId varchar(255),
>
> > nodeId
varchar(255),
>
> > processInstanceId
bigint,
>
> > processId
varchar(255),
>
> > DATE
datetime,
>
> > primary key
(id)
>
> > ) ENGINE=InnoDB
>
> >
>
> > I used a naming strategy for the hibernate that's why the
above
> table
>
> > names.
>
> >
>
> > My question is when the primary key generation is
"native" why not
>
> > let these columns be of type 'long' and get generated
as "bigint"
>
> > for the sql type.
>
> >
>
> > If they can't be changed - should we just extend the above
classes
>
> > and have these fields as long/bigint.
>
> >
>
> > Any suggestion will be appreciated.
>
> >
>
> > Thanks
>
> > Vijay
>
> >
>
>
>
>
>
>
>
>
>
> Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
>
> _______________________________________________
>
> rules-users mailing list
>
> rules-users@lists.jboss.org
>
> https://lists.jboss.org/mailman/listinfo/rules-users
>
Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users