• 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: Custom Type for NSTimestamp
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom Type for NSTimestamp


  • Subject: Re: Custom Type for NSTimestamp
  • From: Andrew Lindesay <email@hidden>
  • Date: Tue, 9 Dec 2008 10:30:36 +1300

Hello David;

I wrote such a thing some years ago to handle an odd situation with MySQL and NSTimestamp. You may like to download LEWOStuff and look at the class;

	nz.co.lindesay.common.webobjects.eo.LEEONSTimestampFromMySQLString

Sorry I no longer have any doco on the usage of this class, but it may give you some pointers.

cheers.

I'm trying to work with an existing database where they have stored date/time information as a Long Integer in the database.
I'm trying to figure out the best way to use a Custom Type in the Entity Model so the app sees the attributes as NSTimestamps.
I've subclassed NSTimestamp and added a method to convert the db value to it when read, which works, but getting it to write a Long back to the database is what I'm struggling with.
I'm sure it is something simple, but I'm just not seeing it.

___ Andrew Lindesay www.lindesay.co.nz

_______________________________________________
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: 
 >Custom Type for NSTimestamp (From: David Avendasora <email@hidden>)

  • Prev by Date: Re: Custom Type for NSTimestamp
  • Next by Date: Question about UI technique for adding a new object to a list
  • Previous by thread: Re: Custom Type for NSTimestamp
  • Next by thread: Re: Custom Type for NSTimestamp
  • Index(es):
    • Date
    • Thread