Re: Patched MySQL plugin
Re: Patched MySQL plugin
- Subject: Re: Patched MySQL plugin
- From: David Avendasora <email@hidden>
- Date: Thu, 30 Sep 2010 05:50:39 -0400
Hi all,
I think that the way to handle this, along with other "If we make it right, it's going to break existing code" issues is going to be 100% dependent upon how the UI of the dev tools handles this.
1) Models/Entities/Attributes need to have a concept of deprecation. Maybe use the UserInfo dictionary? (user info of the prototype has "deprecated=true" and "deprecatedNote=reason" in it?)
2) Entity Modeler displays a validation warning on open and save if you are using a deprecated prototype.
3) In Entity Modeler, when you switch a Prototype, it clears out all existing attribute properties and sets them to the properties of the new prototype.
4) _Entity.java EOGenerator template needs to pick up that a given class attribute is using a deprecated prototype and have it deprecate the getter/setters (and include the depreationNote in the Javadoc) in the _MyEntity class
What this would mean for this situation is that we create 2 new Prototypes DateOnly and DateWithTime and deprecate Date. The next time someone opens their project that uses the deprecated Date prototype they'll get a warning on their Model telling them that the Date prototype they are using has been deprecated, and the next time they EOGenerate the getters/setters will be deprecated as well. Any methods that use them will show as deprecated and have the deprecationNote from the UserInfo in the mouse-over , e.g., "mySetter uses a deprecated prototype in the model. You should use either DateOnly or DateWithTime instead of Date as the Date prototype is horribly broken and likely doesn't do what you think it does."
I think this would allow for making changes without breaking anything, yet encourage people to switch to the new prototypes.
Dave
On Sep 30, 2010, at 3:03 AM, Simon wrote:
>> Calendar dates should not be represented by NSTimestamp. The Date prototype is wrong for using it IMHO.
>
> i couldn't agree more. but where do we go from here ?
>
> 1) leave the mysql date prototype as it is now, broken and unusable
>
> 2) patch the mysql date prototype so that it works properly, but still
> mapped to NSTimestamp so that we don't break everyone in the world who
> is using it as an NSTimestamp
>
> 3) change the mysql date prototype completely (i'm a fan of plain old
> int's) and put up with the flack from the people we break!
>
> 4) alternatively i guess we could just add a new mysql prototype (e.g.
> intDate) .... ?
>
> simon
> _______________________________________________
> 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