Dear all,

I have watched this thread with interest. The changes are straightforward but 
they do break compatibility with older versions of Hibernate. One issue with 
publishing a jar containing these patches is that Hibernate 3.5 and later are 
not yet in Maven central. In usertype I currently provide runtime support for 
both 3.6 and 3.5 and earlier. There is also a simple migration to JSR 310. 

Why would you not want to use the usertype project? I am very interested in 
your feedback so I can address any issues you had.

Thanks and Regards 


Chris

-----Original Message-----
From: Tim's Junk [mailto:j...@barlotta.net] 
Sent: 19 January 2011 00:57
To: Discussion of the Joda project
Cc: Stephen Colebourne; bhat...@comcast.net
Subject: Re: [Joda-interest] Recompile Joda-Time Hibernate to make it work with 
Hibernate 3.6

I actually made similar changes locally and posted about where to submit the 
patch to on the sourceforge discussion forum.  I didn't get a reply but I did 
get an email from some folks asking for the changes.
 Attached is the source and binary of the changes I made.  It is more than just 
a recompile for 3.6 and instead uses the "org.hibernate.type.*" classes.  (ex. 
PersistentLocalDate uses org.hibernate.type.TimestampType.INSTANCE).

Minor patch, but I hope it helps.

On Mon, Jan 17, 2011 at 2:29 PM, Connor Barry <con...@slickapps.com> wrote:
> I just dropped the source inside my own project, then changed 
> Hibernate.XX to StandardBasicTypes.XX everywhere, and removed a couple 
> deprecated Joda type classes I wasn't using. The fact that 
> Hibernate.TIMESTAMP is now a Timestamp type wasn't a problem since 
> that also has nullSafeGet, nullSafeSet methods (IIRC it's 
> backward-compatible).
>
>
> On 1/16/2011 5:11 PM, Stephen Colebourne wrote:
>> Thanks for the investigation work. Thats a nasty change for a widely 
>> used library to make in a point release...
>>
>> I may do this when I release Joda-Time v2, although it will have to 
>> be a v2 of the hibernate plugin for clarity.
>>
>> Stephen
>>
>>
>> On 16 January 2011 23:51, Charles Gutjahr<charl...@ourcommunity.com.au>  
>> wrote:
>>> The Joda-Time Hibernate library no longer works with the latest 
>>> release of Hibernate, version 3.6. This was brought up on the 
>>> SourceForce issue tracker in bug ID 3090209. The resolution 
>>> suggested there was to stop using Joda-Time Hibernate and switch to another 
>>> project called User Type.
>>> However Joda-Time Hibernate does actually work fine if you compile 
>>> it against Hibernate 3.6. No code changes are required, it just that 
>>> the Hibernate method signatures have changed slightly and so 
>>> Joda-Time Hibernate needs to be bound against the new return types. 
>>> In particular, Hiberate.TIMESTAMP used to return a NullableType, and 
>>> since 3.6 it returns TimestampType.
>>> Simply updating the Hibernate dependency in Maven (as shown below) 
>>> will make Joda-Time Hibernate work with Hibernate 3.6:
>>>
>>>      <dependency>
>>>
>>>        <groupId>org.hibernate</groupId>
>>>
>>>        <artifactId>hibernate-core</artifactId>
>>>
>>>        <version>3.6.0.Final</version>
>>>
>>>      </dependency>
>>>
>>> This is obviously a pretty simple fix. So can I suggest that someone 
>>> publishes an official release of Joda-Time Hibernate on SourceForge 
>>> that has been compiled again Hibernate 3.6? Barring that, at least 
>>> tell people on the website that the library works with Hibernate 3.6 
>>> if they recompile it themselves?
>>> Cheers
>>> Charles
>>>
>>> --------------------------------------------------------------------
>>> ---------- Protect Your Site and Customers from Malware Attacks 
>>> Learn about various malware tactics and how to avoid them. 
>>> Understand malware threats, the impact they can have on your 
>>> business, and how you can protect your company and customers by using code 
>>> signing.
>>> http://p.sf.net/sfu/oracle-sfdevnl
>>> _______________________________________________
>>> Joda-interest mailing list
>>> Joda-interest@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/joda-interest
>>>
>>>
>> ---------------------------------------------------------------------
>> --------- Protect Your Site and Customers from Malware Attacks Learn 
>> about various malware tactics and how to avoid them. Understand 
>> malware threats, the impact they can have on your business, and how 
>> you can protect your company and customers by using code signing.
>> http://p.sf.net/sfu/oracle-sfdevnl
>> _______________________________________________
>> Joda-interest mailing list
>> Joda-interest@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/joda-interest
>
> ----------------------------------------------------------------------
> -------- Protect Your Site and Customers from Malware Attacks Learn 
> about various malware tactics and how to avoid them. Understand 
> malware threats, the impact they can have on your business, and how 
> you can protect your company and customers by using code signing.
> http://p.sf.net/sfu/oracle-sfdevnl
> _______________________________________________
> Joda-interest mailing list
> Joda-interest@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/joda-interest
>



--
Tim

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Joda-interest mailing list
Joda-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/joda-interest

Reply via email to