db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hoang-Vu PHUNG <hvu_ph...@yahoo.fr>
Subject Re: ClassCastException with torque
Date Mon, 06 Dec 2004 21:36:59 GMT
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


Mime
View raw message