Hi Paul,

Have you tried Joda Time LocalDate [1]? 

"LocalDate is an immutable datetime class representing a date without a time 
zone."

You could create a custom type to map the DATE external type to the LocalDate 
class, instead of using NSTimestamp or java.util.Date. It is similar to the 
Boolean solution.

[1]http://joda-time.sourceforge.net/apidocs/org/joda/time/LocalDate.html

Cheers,

Henrique

On 11/08/2010, at 03:56, Paul Hoadley wrote:

> On 10/08/2010, at 11:33 PM, John Huss wrote:
> 
>> On Tue, Aug 10, 2010 at 6:12 AM, Paul Hoadley <[email protected]> wrote:
>> For the attribute that we may as well call the "birthday" attribute, I'm 
>> using the "date" prototype from ERPrototypes.  Curiously (IMHO), this 
>> prototype has an external type of "TIMESTAMP", even though Postgres offers 
>> the 1-day-resolution "DATE" type.  In any case, I stuck with the prototype 
>> as shipped.
>> 
>> I would consider that a bug in ERPrototypes, since there is a dateTime 
>> prototype, the date prototype only makes sense if it is different.  But 
>> fixing it is difficult since it could break everyone using it.  Even so, it 
>> wouldn't be the first time such a thing was done, and I am a proponent of 
>> getting things right, as long as the community is sufficiently notified.
> 
> I wonder if it's incidental to the real problem, though, which is that EOF 
> and Java have no 1-day-resolution date type.  That is, and I haven't tested 
> it (though it's on my list), I'm not sure that using PostgreSQL's DATE type 
> would actually solve the problem.
> 
> 
> -- 
> Paul.
> 
> http://logicsquad.net/
> 
> 
> _______________________________________________
> 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/hprange%40gmail.com
> 
> This email sent to [email protected]

 _______________________________________________
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