The bytea is a byte array, which is the default way that JDO/DN stores serializable objects. I'm guessing that the IsisDateMapping isn't configured correctly, for some reason.
But, as Jeroen says, I suggest you go with the Joda types. And I've been wondering if we should have a vote on whether to deprecate Isis' own Date and DateTime classes. They don't offer anything over and above what Joda gives us. And when Java8 comes out, we can look forward to javax.time and all this as part of the JDK. Dan On 6 May 2013 12:32, Jeroen van der Wal <[email protected]> wrote: > Hi Alain, > > Looking at the IsisDateMapping it should store as a Long in in the database > so I don't know why you get the bytea. > > In our current project we moved away from the applib Data/Time classes and > now use the excellent Joda types. This is supported natively by > Datanucleus. > > If you want to further investigate the custom type mapping perhaps the > Datanucleus documentation [1] is a good start. > > Cheers, > > Jeroen > > [1] http://www.datanucleus.org/extensions/rdbms_java_types.html > > > > > On Mon, May 6, 2013 at 12:37 PM, 张峰昌 <[email protected]> wrote: > > > Hi Dan: > > > > > > > > What’s the default data type will be used when model a filed with type > org. > > apache.isis.applib.value.Date Or DateTime in JDO dataobject store? > > > > I have found that “bytea” will be used in Postgres Database with JDO > > object store.I needs date or datetime datatype in postgres databse,can > you > > help me to correct the problem? > > > > > > > > A sample mode property: > > > > // {{ FromDate (property) > > > > private DateTime fromDate; > > > > > > > > @MemberOrder(sequence = "3") > > > > @Named("开始时间") > > > > @Persistent > > > > public DateTime getFromDate() { > > > > return fromDate; > > > > } > > > > > > > > public void setFromDate(final DateTime fromDate) { > > > > this.fromDate = fromDate; > > > > } > > > > // }} > > > > > > > > Best Regards > > > > > > > > Alain > > > > > > > > >
