Have you tried using @Temporal? Refer the copy of the ejb3 persistence API
found at Hibernate's site (http://www.hibernate.org/hib_docs/ejb3-api/).
Rance
mraible wrote:
>
> I'm not sure as I haven't tried to use a Timestamp in a project with
> annotations. Maybe it has something to do with the dialect? You
> might try changing to use a MySQL5InnoDBDialect.
>
> Matt
>
> On 5/6/07, jlukar <[EMAIL PROTECTED]> wrote:
>>
>> Hi,
>>
>> I am using AppFuse 2.0 and my POJO annotated as @Entity.
>>
>> this field:
>>
>> public Timestamp getTimestamp() {
>> return timestamp;
>> }
>>
>> gets created as column type "datetime" eventhough Hibernate is supposed
>> to
>> underestand Timestamp.
>>
>> What I am trying to do is to use mysql "timestamp" column so that on
>> every
>> insert/update, MySQL will automatically write the current timestamp to
>> this
>> column for my pojo. This is for auditing purposes so I know when the
>> POJO
>> was last touched.
>>
>>
>> Anyone have any idea why AppFuse keeps creating this column as "datetime"
>> ?
>>
>> thanks for insights and furthermore thanks for AppFuse. Its made my life
>> easier.
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Timestamp%2C-Hibernate-annotation-and-MySQL-tf3698517s2369.html#a10342430
>> Sent from the AppFuse - User mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
> --
> http://raibledesigns.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/Timestamp%2C-Hibernate-annotation-and-MySQL-tf3698517s2369.html#a10442101
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]