Re: [hibernate-dev] Adding features to Dialect class

2012-04-30 Thread Eric Dalquist
Could this be a common enough issue that Hibernate includes a work-around type so that everyone doesn't have to write their own? We've had to address this wonderful Oracle "feature" via a custom user type as well, ours is based on http://usertype.sourceforge.net/ and the NullSafeStringType and

Re: [hibernate-dev] Adding features to Dialect class

2012-04-23 Thread Łukasz Antoniak
We figure out whether data of a single property has changed in SinglePropertyMapper#mapToMapFromEntity(SessionImplementor, Map, Object, Object). So the comparison is based on equals() method. I wanted to change this to: public boolean mapToMapFromEntity(SessionImplementor session, Map data, Obj

Re: [hibernate-dev] Adding features to Dialect class

2012-04-23 Thread Steve Ebersole
Personally I think people relying on this Oracle (mis-)behavior are just asking for problems. But lets say people do agree that we should handle this... so you add a method to Dialect to handle detect this environment... how do you plan on checking it? Today it is the Types that are responsibl

Re: [hibernate-dev] Adding features to Dialect class

2012-04-23 Thread Łukasz Antoniak
Totaly agree that expecting null to be equal to empty string in Java model is wrong. IMO he has spotted that when null string reference is replaced with an empty string, Envers creates new revision. From database perspective (Oracle) two records does not differ in any way. This could be actual

Re: [hibernate-dev] Adding features to Dialect class

2012-04-23 Thread Steve Ebersole
Their better option is to apply a Type for String that handles this. http://docs.jboss.org/hibernate/orm/4.1/manual/en-US/html_single/#types-registry This is the type of thing we will be able to handle automatically in 5.0 But as for the forum user's exact question, personally I think him expe