You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Armin Waibel <ar...@code-au-lait.de> on 2003/11/14 16:13:51 UTC

Re: Problem with java.util.Date in Form and java.sql.Date in OJB

Hi,

use a FieldConversion
e.g. JavaDate2SqlDateFieldConversion

see http://db.apache.org/ojb/jdbc-types.html

regards,
Armin

Antonio Gallardo wrote:
> Hi:
> 
> I know we need to use java.sql.Date in OJB. I have some Objects that
> returns me java.util.Date.
> 
> Can OJB manage this? is there an easy conversion to solve this problem?
> 
> My problem is because Cocoon Forms need to manage java.util.Date and OJB
> java.sql.Date.
> 
> If you know how I can solve this with a current conversion inside OJB.
> Please let me know :-D
> 
> I am using JDO inside OJB.
> 
> Best Regards,
> 
> Antonio Gallardo
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Problem with java.util.Date in Form and java.sql.Date in OJB

Posted by Antonio Gallardo <ag...@agsoftware.dnsalias.com>.
Druid is updated in CVS, please update it if you need this stuff.

I added a need switch in OJB generation: use Date Convertor.

Best Regards,

Antonio Gallardo


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Problem with java.util.Date in Form and java.sql.Date in OJB

Posted by Antonio Gallardo <ag...@agsoftware.dnsalias.com>.
Armin Waibel dijo:
> Hi,
>
> use a FieldConversion
> e.g. JavaDate2SqlDateFieldConversion
>
> see http://db.apache.org/ojb/jdbc-types.html

Thanks Armin. In fact the solution is great:

Just add to the field a new attribute:

conversion="org.apache.ojb.broker.accesslayer.conversions.JavaDate2SqlDateFieldConversion"

Best Regards,

Antonio Gallardo


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org