[jboss-user] [JBoss Tools] - Hibernate tools - Reverse Engineering - Issue with ID class equals method for BigDecimal fields
purna chand cherukuri
do-not-reply at jboss.com
Sat Sep 22 13:35:54 EDT 2012
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&containerType=14&container=2128]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120922/cbe8b5f5/attachment.html
More information about the jboss-user
mailing list