RE: [JBoss-dev] ClassCastException from ProxyCompiler$Proxy35.getId(generated)

2003-07-10 Thread Nathan Blair
] 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

Re: [JBoss-dev] ClassCastException from ProxyCompiler$Proxy35.getId(generated)

2003-07-10 Thread Alexey Loubyansky
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

RE: [JBoss-dev] ClassCastException from ProxyCompiler$Proxy35.getId(generated)

2003-07-10 Thread MNewcomb
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.

RE: [JBoss-dev] ClassCastException from ProxyCompiler$Proxy35.getId(generated)

2003-07-10 Thread MNewcomb
-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-dev] ClassCastException from ProxyCompiler$Proxy35.getId(generated)

2003-07-10 Thread MNewcomb
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