-
1. Re: Hibernate tools - Reverse Engineering - Issue with ID class equals method for BigDecimal fields
maxandersen Sep 24, 2012 9:53 AM (in response to purna.cherukuri)best thing you can do is to create a pullrequest with a test failing and the change that fixes it - makes it much easier to comment on your exact code question.
note, it sounds like you are on the right direction.
-
2. Re: Hibernate tools - Reverse Engineering - Issue with ID class equals method for BigDecimal fields
maxandersen Sep 24, 2012 9:56 AM (in response to maxandersen)just took a look and the problem is that the equals generate method is (as you point out) using unqualified javatypename instead of actually looking at the property type passed into the equals generation method.
Do you want to take an attempt on fixing this ? Should be fairly easy to fix.
-
3. Re: Hibernate tools - Reverse Engineering - Issue with ID class equals method for BigDecimal fields
purna.cherukuri Sep 24, 2012 12:21 PM (in response to maxandersen)Thanks Max for a prompt response and confirming my understanding of the issue.
I would love to fix it, but i really dont know the process/steps.
It would be great if you can help me with the process of attempting a fix.
Or if you find it little too much to explain these things, could you please fix it for me?
Thank you.
-
4. Re: Hibernate tools - Reverse Engineering - Issue with ID class equals method for BigDecimal fields
maxandersen Sep 24, 2012 1:45 PM (in response to purna.cherukuri)Hi Purna,
The repository is at https://github.com/hibernate/hibernate-tools
https://help.github.com/articles/fork-a-repo explains how you fork a repository and https://help.github.com/articles/be-social shows how to create Pull request.
The code is plain Maven project you can import into Eclipse with m2e installed or some other IDE that understands maven.
You can build the project by running "mvn clean install -DskipTest" (of course remove the -DskipTest to run the unit tests)
You can probably add a test into https://github.com/hibernate/hibernate-tools/blob/master/src/test/org/hibernate/tool/hbm2x/Hbm2JavaTest.java that tests your case.
Welcome to being able to contribute - we are also in #jbosstools on irc if looking for help, but if not finding it there just post here.
-
5. Re: Hibernate tools - Reverse Engineering - Issue with ID class equals method for BigDecimal fields
purna.cherukuri Oct 3, 2012 10:56 AM (in response to maxandersen)Hi Max,
Thanks alot for the information.
My colleague named Venkata Ramana Reddy has committed the changes. Could you please let us know, when can we download the jar with these changes? Does these changes get merged into 3.2.4 version which we are using? Please let us know the process to get the jar with the fix.
Once again, thanks alot for the support.
-
6. Re: Hibernate tools - Reverse Engineering - Issue with ID class equals method for BigDecimal fields
maxandersen Oct 4, 2012 5:46 AM (in response to purna.cherukuri)the fix is not complete - but it does fix your specific case (assuming you nothing else named BigDecimal) thus i suggest if you urgently need it simply build it from source and use tha.
And no, it will not be merged in to 3.2.4 (many years old), it would be put on 3.5.x-4.0.x once we get a full fix that looks at the full typename and not just the last part of the typename.