purna chand cherukuri [
https://community.jboss.org/people/purna.cherukuri] created the
discussion
"Hibernate tools - Reverse Engineering - Issue with ID class equals method for
BigDecimal fields"
To view the discussion, visit:
https://community.jboss.org/message/760978#760978
--------------------------------------------------------------
Hi,
I am using Hibernate tools of version 3.2.4.
When I reverse engineer the tables, the composite keys are getting created as separate Id
classes which is correct.
But the issue is with the equals method of ID class.
In equals method, for BigDecimal fields, it is generating equals only instead of
compareTo.
I found this issue as resolved in JIRA(
https://hibernate.onjira.com/browse/HBX-400 ).
But it doesnt seem like working for me as expected.
As I gone through the code, I understood the issue is in *useCompareTo()* method of
*BasicPOJOClass.java*.
I think it should look for the string "BigDecimal" rather checking for
"java.math.BigDecimal"(As the javaTypeName is getting unqualified using
StringHelper.unqualify() in ImportContextImpl.importType() method).
Please correct me if my understanding is wrong. Please suggest the solution for this.
Thanks in advance.
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/760978#760978]
Start a new discussion in JBoss Tools at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]