• 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: Booleans
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Booleans


  • Subject: Re: Booleans
  • From: David Griffith <email@hidden>
  • Date: Thu, 11 Mar 2004 18:54:26 +0100

Hi Chuck,

Thanks for the link, had a look.  Have actually read all of that on the list
already which is fine.  The 'c' value type I have just added recently to see
if it helped, it didn't.  I'm going to remove it again.

The truth is, I have used the first method described in that article, as
listed below, and it DOES NOT WORK.  I am using custom classes by the way
(as generated by EOModeler) - would that have any impact?  I have not
modified the custom class methods for this attribute.  Basically, I don't
want to go and change all the columns that are boolean to use a numeric
format unless there is no other choice.

I can use a fetchSpec with the following bindings for example:

(fetch spec bindings):
isShipped = $isShipped


And pass it the bindings in code:
bindings.addObject(Boolean.TRUE, "isShipped");

And it will return exactly the correct records.

However, if I use a relationship traversal with an array filter to try and
locate the one I want, I get no results as the value of:

someEntity.isShipped()

ALWAYS returns false, no matter what, even though it is true in the
database.

Anyone else any suggestions before I go ripping my model apart and
recreating tables????  (which have DATA!)

Regards,
Dave.

> Try removing the value type.  I think that c is incorrect for this
> usage.
> See also
> http://wodev.spearway.com/cgi-bin/WebObjects/WODev.woa/wa/Main?
> wikiPage=BooleanModeling
>
> Chuck
>
>
>>> On Mar 10, 2004, at 8:57 PM, David Griffith wrote:
>>>
>>>> HI all,
>>>>
>>>> I have en EOPrototype set up in my EOModel like this:
>>>>
>>>> Name: boolean
>>>> Value Class:  java.lang.Boolean
>>>> Factory Method:  valueOf
>>>> Conversion Method:  toString
>>>> Init Arguament: NSString
>>>>
>>>> And I have just added 'c' as the value type.
>>>>
>>>> The value stored in the database as a result is 'true' or 'false' and
>>>> it is
>>>> getting stored ok.
>>>>
>>>> However, anytime I reference the value in code, like:
>>>>
>>>> orderStatus.oscIsShipped()
>>>>
>>>> I ALWAYS get false.  No matter what.  Even though it is true in the
>>>> database.
>>>>
>>>> It's got to be something small, can someone tell me why?  It's
>>>> driving
>>>> me
>>>> crazy.
>>>>
>>>> Regards,
>>>> Dave.
>>>> _______________________________________________
>>>> webobjects-dev mailing list | email@hidden
>>>> Help/Unsubscribe/Archives:
>>>> http://www.lists.apple.com/mailman/listinfo/webobjects-dev
>>>> Do not post admin requests to the list. They will be ignored.
>>> _______________________________________________
>>> webobjects-dev mailing list | email@hidden
>>> Help/Unsubscribe/Archives:
>>> http://www.lists.apple.com/mailman/listinfo/webobjects-dev
>>> Do not post admin requests to the list. They will be ignored.
>> _______________________________________________
>> webobjects-dev mailing list | email@hidden
>> Help/Unsubscribe/Archives:
>> http://www.lists.apple.com/mailman/listinfo/webobjects-dev
>> Do not post admin requests to the list. They will be ignored.
> _______________________________________________
> webobjects-dev mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/webobjects-dev
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Booleans
      • From: Jonathan Rochkind <email@hidden>
    • Re: Booleans [SOLVED]
      • From: David Griffith <email@hidden>
References: 
 >Re: Booleans (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: Booleans
  • Next by Date: Re: DbEdit again
  • Previous by thread: Re: Booleans
  • Next by thread: Re: Booleans [SOLVED]
  • Index(es):
    • Date
    • Thread