• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: EOModeler and boolean
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EOModeler and boolean


  • Subject: Re: EOModeler and boolean
  • From: "Daniele Corti" <email@hidden>
  • Date: Mon, 23 Apr 2007 16:20:37 +0200



2007/4/23, WIESEN Bruno <email@hidden>:
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      (

This email sent to email@hidden

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@hidden
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: EOModeler and boolean
      • From: WIESEN Bruno <email@hidden>
References: 
 >EOModeler and boolean (From: WIESEN Bruno <email@hidden>)

  • Prev by Date: EOModeler and boolean
  • Next by Date: Re: EOModeler and boolean
  • Previous by thread: EOModeler and boolean
  • Next by thread: Re: EOModeler and boolean
  • Index(es):
    • Date
    • Thread