• 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: Lachlan Deck <email@hidden>
  • Date: Tue, 24 Apr 2007 12:27:05 +1000

Hi there,

On 24/04/2007, at 12:07 PM, Kieran Kelleher wrote:

IIRC, there was a time when SMALLINT/c was troublesome in past versions of WO .... might be fixed now,

Fair enough. I can't recall having a problem with them so it must have been pre 5.1 or 2.


In any case, this thread began with someone having difficulty with boolean modeling. Works in development and does not in deployment....

I'd say the simple problem was both (a) improper definition of external type, and (b) incomplete/missing definition of valueType.


IMHO, the char(5) solution always works and is totally bulletproof and trouble free for every database vendor ..... but there are many ways to skin a cat, so whatever works.

Sure. But it's helpful to know/learn the different ways of skinning the cat so that you've got options.


If Bruno continues having problems with boolean modeling of an int, then better to spend 2 minutes implementing the char(5) and be done with it so he can get his project progressing rather than spend hours trying to figure why a boolean int works in dev and not in deployment. Just my opinion..... but for sure not a rule by any means.

Sure. I forgot to add that in my EOGenerator template (if you're using EOGenerator... sudo port install eogenerator) I've adjusted the JavaSourceEOF52.eotemplate.


<....>
<$foreach Attribute classAttributes.@sortedNameArray do
$>
<$if Attribute.javaValueClassName eq 'Number' && Attribute.valueType eq 'c'$>
public Boolean <$Attribute.name$>() {
return ( Boolean )storedValueForKey( < $Attribute.name.initialCapitalString$>Key );
}

public void set<$Attribute.name.initialCapitalString$>( Boolean aValue ) {
takeStoredValueForKey( aValue, <$Attribute.name.initialCapitalString $>Key );
}
<$ else $>
// normal definition
<$endif$><$endforeach do
$>
<....>


with regards,
--

Lachlan Deck



_______________________________________________
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: Kieran Kelleher <email@hidden>
    • Re: EOModeler and boolean
      • From: Mike Schrag <email@hidden>
References: 
 >EOModeler and boolean (From: WIESEN Bruno <email@hidden>)
 >Re: EOModeler and boolean (From: Kieran Kelleher <email@hidden>)
 >Re: EOModeler and boolean (From: Lachlan Deck <email@hidden>)
 >Re: EOModeler and boolean (From: Kieran Kelleher <email@hidden>)

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