tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thiago Veronezi <thi...@veronezi.org>
Subject Re: Date format for Column Conversion, String on Bean, Date on Database
Date Tue, 14 Jun 2011 14:55:59 GMT
You can also try...

@Column(*updatable = false*)
@Temporal(TemporalType.TIMESTAMP)
private Date installedDateTime;

[]s,
Thiago.

On Tue, Jun 14, 2011 at 4:37 AM, rnieto <gamma_ass@yahoo.com> wrote:

> Thanks, I'll look up on that one. I've seen OpenJPA has this @Temporal
> annotation. Would something like this work:
>
>    @Column(name = "InstalledDateTime")
>    @Temporal(TemporalType.TIMESTAMP)
>    private String installedDateTime;
>
>
> Romain Manni-Bucau wrote:
> >
> > you can probably play with callbacks: @PostContruct for example -> you'll
> > get the database value then in the post construct method you can modify
> > the
> > value.
> >
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Date-format-for-Column-Conversion-String-on-Bean-Date-on-Database-tp3595707p3595978.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message