On May 28, 2009, at 2:12 PM, Chuck Hill wrote:


On May 28, 2009, at 3:21 AM, David Avendasora wrote:

Hi Fred

Glad to hear that you have everything working!

On May 27, 2009, at 7:07 PM, Fred Wells wrote:

Two things, for some reason I thought that checking 'Generate source' in the Table view also was for the columns as well, not so. Also I'm not sure where the prototypes are from but the ones that just show up in Entity Modeler have some issues specifically with the number prototypes. Anyway after clearing those out and getting the data types to show up correctly everything is on.

You must have the ERPrototypes framework added to your classpath. This is what provides all the various prototypes. If you look in your DB config, there's a place you can select the set of Prototypes you want to use. The problem is that there isn't one that is specifically for MSSQLServer.

I've created my own prototypes. It is simple to do and will make your life much easier in the future - and will keep Chuck from calling you stupid at WOWODC. :-)

Him perhaps, but not you!  :-P

Well, duh. I wish the reasons for you calling me names were limited to just EOPrototypes ... or WebObjects for that matter. :-)

1) Take ERPrototypes out of your project's build path.
2) Create an entity in your Model called "EOJDBCPrototypes" then add an attribute for each prototype you want.

I'd even use the same names as the WOnder ones you were using, just change the external type to match SQLServer's. For example, I use NVARCHAR instead of VARCHAR beause it is MSSQLServer's data type that can store unicode strings without conversion.

At some point we should add MSSQLServer prototypes to ERPrototypes, I'll look into it after WOWODC. Any chance you are going to be there?

thanks everybody.

Those of us afflicted with MSSQLServer need to stick together. Thankfully Chuck is so afflicted (ha ha Chuck!).

David, David, David. Had I not told you? The Powers That Be on my project have decreed that we no longer have to target The Accursed Database (formerly known as SQL Server). This was followed by much rejoicing and deleting of odious Accursed Database Hacks.

Nooooooooooooooooooooooooooooooooo! My dreams of SQLServer being one of the targeted DBs for the new validation framework have been dashed.

Dave

I find using MSSQLServer with WebObjects to be similar to Vertical Inheritance in that it should work in theory and usually does at first, but then the more you dig into it you start to find things that just don't work quite as you'd expect and since most people on the list don't use it, there are obscure bugs lurking waiting to bite you.

Amen.


If you are not using Chuck's MSSQLServerPlugIn, You will want to, otherwise you are going to end up with intermittent FK-constraint errors. Even if you haven't yet, you will. Use it.

Yes.


You can find it here: http://www.gvcsitemaker.com/chill/ms_sql_server_eof_plugin

Dave

Chuck

Frederick Wells
MarketForward, a Publicis Groupe Company
427 South LaSalle St.
Chicago, Il 60605
312.220.3056

-----David Avendasora <webobje...@avendasora.com> wrote: -----

To: Fred Wells <fred.we...@marketforward.com>
From: David Avendasora <webobje...@avendasora.com>
Date: 05/27/2009 03:33PM
cc: Development WebObjects <webobjects-dev@lists.apple.com>
Subject: Re: lock operation locked more than one row issue!

What ERPrototypes are you using? There is no set of MSSQLServer Prototypes, and the JDBC define java.lang.Integer attributes (id, intNumber, intBoolean, etc) as having an external type of INTEGER, which is not what SQL Server calls an Integer data type. It uses 'int'.

Maybe that's it?

Dave


On May 27, 2009, at 3:18 PM, Fred Wells wrote:

Here is one of my plist:

{
   attributes = (
       {
           allowsNull = Y;
           columnName = duration;
           name = duration;
           prototypeName = intNumber;
userInfo = {"_EntityModeler" = {generateSource = NO; }; };
       },
       {
           allowsNull = Y;
           columnName = durationIsDays;
           name = durationIsDays;
           prototypeName = charFlag;
userInfo = {"_EntityModeler" = {generateSource = NO; }; };
       },
       {
           allowsNull = N;
           name = id;
           prototypeName = id;
userInfo = {"_EntityModeler" = {generateSource = NO; }; };
       },
       {
           allowsNull = Y;
           columnName = idForTemplate;
           name = idForTemplate;
           prototypeName = intNumber;
userInfo = {"_EntityModeler" = {generateSource = NO; }; };
       },
       {
           allowsNull = Y;
           columnName = instruction;
           name = instruction;
           prototypeName = varchar255;
userInfo = {"_EntityModeler" = {generateSource = NO; }; };
       },
       {
           allowsNull = Y;
           columnName = isActive;
           name = isActive;
           prototypeName = charFlag;
userInfo = {"_EntityModeler" = {generateSource = NO; }; };
       },
       {
           allowsNull = Y;
           columnName = isFirstTask;
           name = isFirstTask;
           prototypeName = charFlag;
userInfo = {"_EntityModeler" = {generateSource = NO; }; };
       },
       {
           allowsNull = Y;
           columnName = isLastTask;
           name = isLastTask;
           prototypeName = charFlag;
userInfo = {"_EntityModeler" = {generateSource = NO; }; };
       },
       {
           allowsNull = Y;
           columnName = name;
           name = name;
           prototypeName = varchar100;
userInfo = {"_EntityModeler" = {generateSource = NO; }; };
       },
       {
           allowsNull = N;
           columnName = phaseID;
           name = phaseID;
           prototypeName = id;
userInfo = {"_EntityModeler" = {generateSource = NO; }; };
       },
       {
           allowsNull = Y;
           columnName = taskID;
           name = taskID;
           prototypeName = id;
userInfo = {"_EntityModeler" = {generateSource = NO; }; };
       },
       {
           allowsNull = Y;
           columnName = taskID1;
           name = taskID1;
           prototypeName = id;
userInfo = {"_EntityModeler" = {generateSource = NO; }; };
       },
       {
           allowsNull = Y;
           columnName = taskID2;
           name = taskID2;
           prototypeName = id;
userInfo = {"_EntityModeler" = {generateSource = NO; }; };
       },
       {
           allowsNull = N;
           columnName = taskTypeID;
           name = taskTypeID;
           prototypeName = id;
userInfo = {"_EntityModeler" = {generateSource = NO; }; };
       },
       {
           allowsNull = Y;
           columnName = threshold;
           name = threshold;
           prototypeName = intNumber;
userInfo = {"_EntityModeler" = {generateSource = NO; }; };
       },
       {
           allowsNull = Y;
           columnName = thresholdIsDays;
           name = thresholdIsDays;
           prototypeName = charFlag;
userInfo = {"_EntityModeler" = {generateSource = NO; }; };
       },
       {
           allowsNull = Y;
           columnName = workflowTemplateID;
           name = workflowTemplateID;
           prototypeName = id;
userInfo = {"_EntityModeler" = {generateSource = NO; }; };
       },
       {
           allowsNull = N;
           columnName = workgroupID;
           name = workgroupID;
           prototypeName = id;
userInfo = {"_EntityModeler" = {generateSource = NO; }; };
       },
       {
           allowsNull = Y;
           columnName = xCoordinate;
           name = xCoordinate;
           prototypeName = intNumber;
userInfo = {"_EntityModeler" = {generateSource = NO; }; };
       },
       {
           allowsNull = Y;
           columnName = yCoordinate;
           name = yCoordinate;
           prototypeName = intNumber;
userInfo = {"_EntityModeler" = {generateSource = NO; }; };
       }
   );
   attributesUsedForLocking = (
       duration,
       durationIsDays,
       id,
       idForTemplate,
       instruction,
       isActive,
       isFirstTask,
       isLastTask,
       name,
       phaseID,
       taskID,
       taskID1,
       taskID2,
       taskTypeID,
       threshold,
       thresholdIsDays,
       workflowTemplateID,
       workgroupID,
       xCoordinate,
       yCoordinate
   );
   className = "com.marketforward.mundo.data.TemplateTask";
   classProperties = (
       destinationApprovalTasks,
       destinationRejectTasks,
       destinationTasks,
       duration,
       durationIsDays,
       idForTemplate,
       instruction,
       isActive,
       isFirstTask,
       isLastTask,
       name,
       phase,
       sourceApprovalTask,
       sourceRejectTask,
       sourceTask,
       taskType,
       threshold,
       thresholdIsDays,
       workflowTemplate,
       workgroup,
       xCoordinate,
       yCoordinate
   );
   externalName = TemplateTask;
   fetchSpecificationDictionary = {};
   name = TemplateTask;
   parent = Task;
   primaryKeyAttributes = (id);
   relationships = (
       {
           destination = Task;
           isToMany = Y;
           joinSemantic = EOInnerJoin;
joins = ({destinationAttribute = taskID2; sourceAttribute = id; });
           name = destinationApprovalTasks;
       },
       {
           destination = Task;
           isToMany = Y;
           joinSemantic = EOInnerJoin;
joins = ({destinationAttribute = taskID1; sourceAttribute = id; });
           name = destinationRejectTasks;
       },
       {
           destination = Task;
           isToMany = Y;
           joinSemantic = EOInnerJoin;
joins = ({destinationAttribute = taskID; sourceAttribute = id; });
           name = destinationTasks;
       },
       {
           destination = Phase;
           isMandatory = Y;
           isToMany = N;
           joinSemantic = EOInnerJoin;
joins = ({destinationAttribute = id; sourceAttribute = phaseID; });
           name = phase;
       },
       {
           destination = Task;
           isToMany = N;
           joinSemantic = EOInnerJoin;
joins = ({destinationAttribute = id; sourceAttribute = taskID2; });
           name = sourceApprovalTask;
       },
       {
           destination = Task;
           isToMany = N;
           joinSemantic = EOInnerJoin;
joins = ({destinationAttribute = id; sourceAttribute = taskID1; });
           name = sourceRejectTask;
       },
       {
           destination = Task;
           isToMany = N;
           joinSemantic = EOInnerJoin;
joins = ({destinationAttribute = id; sourceAttribute = taskID; });
           name = sourceTask;
       },
       {
           destination = TaskType;
           isMandatory = Y;
           isToMany = N;
           joinSemantic = EOInnerJoin;
joins = ({destinationAttribute = id; sourceAttribute = taskTypeID; });
           name = taskType;
       },
       {
           destination = WorkflowTemplate;
           isToMany = N;
           joinSemantic = EOInnerJoin;
joins = ({destinationAttribute = id; sourceAttribute = workflowTemplateID; });
           name = workflowTemplate;
       },
       {
           destination = Workgroup;
           isMandatory = Y;
           isToMany = N;
           joinSemantic = EOInnerJoin;
joins = ({destinationAttribute = id; sourceAttribute = workgroupID; });
           name = workgroup;
       }
   );
}

Frederick Wells
MarketForward, a Publicis Groupe Company
427 South LaSalle St.
Chicago, Il 60605
312.220.3056

-----David Avendasora < webobje...@avendasora.com > wrote: -----

To: Fred Wells < fred.we...@marketforward.com >
From: David Avendasora < webobje...@avendasora.com >
Date: 05/27/2009 01:53PM
cc: Chuck Hill < ch...@global-village.net >, Development WebObjects < webobjects-dev@lists.apple.com >
Subject: Re: lock operation locked more than one row issue!

Hi Fred,

On May 27, 2009, at 2:29 PM, Fred Wells wrote:

OK, so after trying several different drivers and all throw some type of locking error either lock failed to retrieve any rows or lock operation locked more than one row. Right now I'm just looking for any more ideas as to where look for a possible cause on this. The EOModel files seem to be fine I can't find anythign out of the ordinary I'm not sure where else to look or if there are any parameters that can be changed to alter how locking is handled.

Are you saying you looked at the EOModel's plist files?

If not, can you paste the contents of that entity's .plist file here? You said you had been using Vertical Inheritance at one point. I have seen stuff get left over in the .plist even when the Entity Modeler UI doesn't show it.

Dave


Frederick Wells
MarketForward, a Publicis Groupe Company
427 South LaSalle St.
Chicago, Il 60605
312.220.3056

-----Chuck Hill < ch...@global-village.net > wrote: -----

To: Guido Neitzer < guido.neit...@gmail.com >
From: Chuck Hill < ch...@global-village.net >
Date: 05/26/2009 07:18PM
cc: Development WebObjects < webobjects-dev@lists.apple.com >, Fred Wells < fred.we...@marketforward.com >
Subject: Re: lock operation locked more than one row issue!


On May 26, 2009, at 5:13 PM, Guido Neitzer wrote:

> On May 26, 2009, at 1:37 PM, Chuck Hill wrote:
>
>> I am not sure what you have done then. The problem is not that it >> is selecting multiple rows. The problem is that it is trying to
>> lock rows:
>>
>>> > > SELECT ...  FROM TemplateTask t0 WITH (UPDLOCK, ROWLOCK)"
>>
>>
>> EOF should not be doing that, that is optimistic^H^H^H^H^H^H^H^
>> pessimistic locking. Something has confused EOF which causes it to
>> do this (it is a bug).
>
> Do you have to tell the plugin that explicitly? Never used MS SQL.


No, you don't.  It is bad, but not that bad.  ;-)

Chuck


--
Chuck Hill             Senior Consultant / VP Development

Come to WOWODC'09 in San Fran this June!
http://www.wocommunity.org/wowodc09/



------------------------------------------------------------------------
Disclaimer
The information in this email and any attachments may contain proprietary and confidential information that is intended for the addressee(s) only. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, retention or use of the contents of this information is prohibited. When addressed to our clients or vendors, any information contained in this e-mail or any attachments is subject to the terms and conditions in any governing contract. If you have received this e-mail in error, please immediately contact the sender and delete the e-mail.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ( Webobjects- d...@lists.apple.com )
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com

This email sent to webobje...@avendasora.com



------------------------------------------------------------------------
Disclaimer
The information in this email and any attachments may contain proprietary and confidential information that is intended for the addressee(s) only. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, retention or use of the contents of this information is prohibited. When addressed to our clients or vendors, any information contained in this e-mail or any attachments is subject to the terms and conditions in any governing contract. If you have received this e-mail in error, please immediately contact the sender and delete the e-mail.



------------------------------------------------------------------------
Disclaimer
The information in this email and any attachments may contain proprietary and confidential information that is intended for the addressee(s) only. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, retention or use of the contents of this information is prohibited. When addressed to our clients or vendors, any information contained in this e-mail or any attachments is subject to the terms and conditions in any governing contract. If you have received this e-mail in error, please immediately contact the sender and delete the e-mail.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net

This email sent to ch...@global-village.net

--
Chuck Hill             Senior Consultant / VP Development

Come to WOWODC'09 in San Fran this June!
http://www.wocommunity.org/wowodc09/




_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to