• 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: Boolean attribute and MS SQL Server
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Boolean attribute and MS SQL Server


  • Subject: Re: Boolean attribute and MS SQL Server
  • From: Chuck Hill <email@hidden>
  • Date: Thu, 9 Sep 2010 08:04:18 -0700

On Sep 9, 2010, at 6:52 AM, Josef Vanek wrote:

> Hi everybody
>
> I've encountered a weird problem when using this configuration :
>
> - WebObjects 5.4.2 (tried on Mac OS and Linux platforms)
> - Wonder 5.0 for WO 5.4
> - ERPrototypes
> - MicrosoftPlugIn
> - JDBC Driver: sqljdbc4.jar
> - MS SQL Server 8
>
> One entity has an attribute which uses boolean prototype.
>
> Here are the logs:
>
> We update an element to set it displayed:
> evaluateExpression: <com.webobjects.jdbcadaptor.MicrosoftPlugIn$MicrosoftExpression: "UPDATE Element SET displayed = ? WHERE id = ?" withBindings: 1:true(displayed), 2:66(id)>
>
>
> Then, when we fetch it again:
> evaluateExpression: <com.webobjects.jdbcadaptor.MicrosoftPlugIn$MicrosoftExpression: "SELECT t0.constant, RTRIM(t0.content), t0.creation
> Date, t0.displayed, t0.formulaFormatterID, t0.id, RTRIM(t0.label), t0.localizedDescriptionID, t0.ordering, t0.resultUnitID, t0.spreadsheetId, RTRIM(t0.type)
> FROM Element t0 WHERE (t0.type = ? AND t0.id = ?)" withBindings: 1:"constant"(type), 2:66(id)>
> sept. 09 15:42:20 DEBUG NSLog  - 1 row(s) processed
> sept. 09 15:42:20 DEBUG NSLog  -  === Commit Internal Transaction
> sept. 09 15:42:20 DEBUG Element  - Element PopTotal is displayed: false
>
>
> How can it be ?
>
> When looking at the database using SQL editor it has not been updated. Why ? The request seems correct.
> Is there a problem with MicrosoftPlugIn ?
>
> When I look in the EOJDBCSQLServerPrototypes.plist, I found:
>
>         {
>             adaptorValueConversionMethodName = toString;
>             columnName = boolean;
>             externalType = bit;

externalType should be varchar, it is storing "true" and "false" (see width = 5 below).


>             factoryMethodArgumentType = EOFactoryMethodArgumentIsNSString;
>             name = boolean;
>             valueClassName = "java.lang.Boolean";
>             valueFactoryMethodName = valueOf;
>             width = 5;
>         },
>
> Is that correct ?
>
>
> Can someone help me with this please ?
>
> Best regards,
> Josef
>
> _______________________________________________
> 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

--
Chuck Hill             Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects







Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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: Boolean attribute and MS SQL Server
      • From: David Avendasora <email@hidden>
References: 
 >Boolean attribute and MS SQL Server (From: Josef Vanek <email@hidden>)

  • Prev by Date: Re: Renaming instanceIdKey - Why Does This Work?
  • Next by Date: Re: Renaming instanceIdKey - Why Does This Work?
  • Previous by thread: Boolean attribute and MS SQL Server
  • Next by thread: Re: Boolean attribute and MS SQL Server
  • Index(es):
    • Date
    • Thread