[prev in list] [next in list] [prev in thread] [next in thread]
List: turbine-torque-user
Subject: Re: ClassCastException with torque
From: Hoang-Vu PHUNG <hvu_phung () yahoo ! fr>
Date: 2004-12-06 21:36:59
Message-ID: 20041206213659.81432.qmail () web86905 ! mail ! ukl ! yahoo ! com
[Download RAW message or body]
Problem solved. I thought there was a mismatch between
torque 3.1.1 and 3.1. After having reinstalled torque
3.1.1 via maven, it worked again. The version
management is really a headache stuff.
--- Hoang-Vu PHUNG <hvu_phung@yahoo.fr> a écrit :
> Hi,
> I'm new to torque. I have managed to use torque
> (versiion 3.1.1) to generate java classes and sql
> script. Then I ran into the problem with nullable
> field having foreign key constrainte. This field is
> a
> primitive data so according to one guy in the
> mailing
> list, I have to just add defaultJavaType="object".
> Unfortunately, after adding that, I got a
> ClassCastException when
> trying to insert a object (st. like User user = new
> User(); user.setUserFirstName("xxx"); ...;
> user.save();
>
> The save method causes an error in BaseUser.java
> (generated by Torque) in the setPrimaryKey method.
> In
> the first line of this method, we can see:
> SimpleKey[] keys = (SimpleKey[]) key.getValue();
>
> It seems that the cast is not allowed here.
>
> I wonder how it could be possible - having a
> successfull automatical generation.
>
> Could somebody here clarify me about these things?
>
> Thanks a lot
> Hoang-Vu
>
>
>
>
>
>
>
>
>
>
> Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace
> de stockage pour vos mails !
> Créez votre Yahoo! Mail sur
> http://fr.mail.yahoo.com/
>
> Avec Yahoo! faites un don et soutenez le Téléthon en
> cliquant sur
> http://www.telethon.fr/030-Don/10-10_Don.asp
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail:
> torque-user-help@db.apache.org
>
>
Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails !
Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com/
Avec Yahoo! faites un don et soutenez le Téléthon en cliquant sur \
http://www.telethon.fr/030-Don/10-10_Don.asp
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic