Hello,

Here is my small problem. I`m porting one application (front-end) from
php to ruby and using DataMapper. Everything was fine until i stack
with DateTime property. Since i cant change anything in database
(mysql) i cant find information how to use unix timestamp with
DataMapper.

* Table structure (simple example)

ID - Autoincrement primary key (INT, UNSIGNED)
Title - Page title (VARCHAR(64))
Content - Page text content (TEXT)
DateCreated - Unix Timestamp of creation date (INT, UNSIGNED)

* Class structure

class Page
        include DataMapper::Resource

        property :id, Integer, :serial => true, :key => true
        property :title, String, :length => 64
        property :content, String
        property :date_created, DateTime

        storage_names[:default] = 'data_pages'
end

Only what i really need - how can i use or convert-on-fly that
timestamp to DateTime class ?

Any suggestions ?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to