2007/4/23, WIESEN Bruno <[EMAIL PROTECTED]>:
Hello,
I recently added a column in my table, i defined it like this in
EOModeler :
value class = NSNumber
External Type = bool
mmm did you check the SQL when you syncronize the EOModel and the database?
maybe it has setted an int instead of a bool?
It worked in a test application but now in the good one, it
failed...I have a JDBCAdaptorException : wrong value for int ...
When i ty to set the boolean field with the set...method : i get a
classCastException
I've get that problem in the get value, when I migrate a boolean field from
OpenBase to FrontBase, in the first relase i brutally manipulate the
getMethod:
the attribute id "enabled":
public Boolean enabled()
{
if(storedValueForKey("enabled") instanceof Boolean)
return (Boolean) storedValueForKey("enabled");
return ((Integer)storedValueForKey("enabled")).intValue() == 1 ? true :
false;
}
Any ideas to solve the problem ?
Thank you!
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/ildenae%40gmail.com
This email sent to [EMAIL PROTECTED]
N.B. I DON'T know why, but when for SOME reasons (why my boss must require a
complete restructure of the DB the day I'm deploying the app :-( ) I've
recreate the model java file, I've tried to use it as Boolean and get no
problems:
I mean EOModeler generates:
public Number enabled()
{
return (Number) storedValueForKey("enabled");
}
I've changed in :
public Boolean enabled()
{
return (Boolean) storedValueForKey("enabled");
}
and it works! o_0
--
Daniele Corti
AIM: S0CR4TE5
Messenger: [EMAIL PROTECTED]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]