]
Subject: [JBoss-dev] ClassCastException from
ProxyCompiler$Proxy35.getId(generated)
jboss-head from ~ July 1.
RedHat 8
JDK 1.4.1
Mysql
I have a simple bean that has auto-generated Integer primary keys.
MyLocal myLocal = myLocalHome.create(name, description);
myLocal.getName(); -- works fine
Hello Michael,
at the moment, I can't comment on why findAll works.
The cause, perhapsm is the types mismatch between the one that is used
by MySQL driver for generated keys be default and the one you
use for primary key column.
AFAIK, MySQL's default is java.lang.Integer. Abstracting from
From: Alexey Loubyansky [mailto:[EMAIL PROTECTED]
Hello Michael,
at the moment, I can't comment on why findAll works.
The cause, perhapsm is the types mismatch between the one that is used
by MySQL driver for generated keys be default and the one you
use for primary key column.
-Original Message-
From: Newcomb, Michael P.
So, what do we do about it? Should
JDBCGetGeneratedKeysCreateCommand test for Number and convert
to expected type? Or should we urge MySQL to create the type
based upon the type of field it is?
Actually,
jboss-head from ~ July 1.
RedHat 8
JDK 1.4.1
Mysql
I have a simple bean that has auto-generated Integer primary keys.
MyLocal myLocal = myLocalHome.create(name, description);
myLocal.getName(); -- works fine
myLocal.getDescription(); -- works fine
myLocal.getId(); -- Throws ClassCastException in