We're using DateTime and LocalDate. The mapping is straight forward..
static mapping = {
columns {
availableFrom (column: 'available_from', index:
'pro_available_from', type:
'org.joda.time.contrib.hibernate.PersistentLocalDate')
availableTo (column: 'available_to', index: 'pro_available_to',
type: 'org.joda.time.contrib.hibernate.PersistentLocalDate')
}
}
n.b. if you don't specify the column name gorm picks a stupid default.
You have to jump through a couple of small hoops if you use the Searchable
plugin or format the DateTime in your gsps. Also watch out for
http://jira.codehaus.org/browse/GROOVY-2773
2008/5/27 Francis Bacon <[EMAIL PROTECTED]>:
> Hi,
> I've been assigned to a project using Groovy&Grails and I saw that
> java.util.Date is used there.
> I'm willing to use DateTime as the de facto Time class. Is there any
> support for Joda Time in Grails? (I mean like how is persistence of DateTime
> columns mapped).
> Is there a plug-in for grails or some known project that integrates Groovy
> and Joda Time? (Groovy has powerful expression capabilities for handling
> dates that could be extended)
>
> Thanks to all
>
> __________________________________________________
> Correo Yahoo!
> Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
> Regístrate ya - http://correo.espanol.yahoo.com/
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Joda-interest mailing list
> Joda-interest@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/joda-interest
>
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Joda-interest mailing list
Joda-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/joda-interest