• 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: EOAttribute's Data Type question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EOAttribute's Data Type question


  • Subject: Re: EOAttribute's Data Type question
  • From: Ray Kiddy <email@hidden>
  • Date: Thu, 29 Oct 2009 18:23:43 -0700


On Oct 29, 2009, at 5:59 PM, Ricardo J. Parada wrote:


Thanks Chuck. Hmmm... that makes my head spin. :-)

Let me ask you something. When you create a new attribute I assume one of the first things you do is set the prototype.

After setting the prototype do you ever mess with the Data Type defaulted by the entity modeler (in general) for traditional attributes such as integers, amounts, dates, strings, booleans, integer primary/foreign keys?

I'm looking at a bunch of eomodels that were created without prototypes and they all differ so much in the valueType for string attributes for example. These models were sometimes edited by hand in a text editor.

Thanks,
Ricardo


It is best to be consistent in your use of the valueType. Some of them do not seem to make much difference, when they have to do with right- trimming a string, for example. But then, sometimes, they make a lot of difference.


It may be that the differences in the valueType is not causing a visible problem. But it sounds as though you know it is not a good thing.

If you change the valueTypes to be consistent and test your application, you should be fine. But look at the documentation for the data types in the columns for your database, think about your application and test any changes. You might want to create small apps to test different valueTypes and see if there are any differences.

cheers - ray



On Oct 29, 2009, at 6:14 PM, Chuck Hill wrote:


On Oct 29, 2009, at 3:04 PM, Ricardo J. Parada wrote:


I decided to move this question into its own email thread:

How does the Data Type chosen for an attribute in entity modeler affect me?

For example, I see different options related to dates / times: i.e. Date, Date (MSSQL), Time, Timestamp.

For new attributes I just leave that with the default once I pick the prototype. But for existing attributes where I have the Data Type already selected and no prototype chosen, and then choose a prototype I'm not sure how changing Data Type would affect me.

For example, if my existing attribute named "creationDateTime" had a Data Type of Timestamp selected and no prototype. And then I set the prototype to dateTime and change the Data Type to Date. Will that affect me somehow? :-)

Short answer: yes.

See Value Type here http://wiki.objectstyle.org/confluence/display/WO/EOF-Modeling-Common+Pitfalls+and+Troubleshooting
That is what this is selecting.

Chuck


-- 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









_______________________________________________ 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


_______________________________________________ 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
References: 
 >EOAttribute's Data Type question (From: "Ricardo J. Parada" <email@hidden>)
 >Re: EOAttribute's Data Type question (From: Chuck Hill <email@hidden>)
 >Re: EOAttribute's Data Type question (From: "Ricardo J. Parada" <email@hidden>)

  • Prev by Date: Re: EOAttribute's Data Type question
  • Next by Date: Re: EOAttribute's Data Type question
  • Previous by thread: Re: EOAttribute's Data Type question
  • Next by thread: Re: EOAttribute's Data Type question
  • Index(es):
    • Date
    • Thread