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 [EMAIL PROTECTED] 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 protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to