[jbosstools-issues] [JBoss JIRA] Commented: (JBIDE-3712) Number of hbm genetation bugs

Dmitry Geraskov (JIRA) jira-events at lists.jboss.org
Thu Feb 26 04:43:54 EST 2009


    [ https://jira.jboss.org/jira/browse/JBIDE-3712?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12454399#action_12454399 ] 

Dmitry Geraskov commented on JBIDE-3712:
----------------------------------------

>I did not rename of ManyToManyTest to SetManyToManyTest; could not see why ?
I renamed it because we have SetElementTest. With new name it is easier to find testcases for Set.

>The changes to proxyinterfacename handling in persistent-class made no sense to me - why where the methods removed and why were the check for classname==proxy removed ?
Because that method was the same as cfg2HbmTool.getClassName() - it always returned className - not a ProxyName - so proxy name could not be exported.

>getCollectionElementTag() could be done better with a value visitor, but ok for now
Yes, I thought about it too, but not realized yes.

>BackRef filtering did not use property.isBackRef() nor the SkipBackRefPropertyIterator - changed it to the latter.
>I also couldn't find any tests for these - especially I would like to see example of why persistent-class.hbm.ftl need backref filtering ?
I'll provide testcase which will show filter necessity 

>Even before doing the above changes I had these failures - what are they about ?
>ToolAllTests
>Test for org.hibernate.tool
>Test for org.hibernate.tool.cfg2hbm
>org.hibernate.tool.hbm2x.hbm2hbmxml.ManyToManyTest
>testAllFilesExistence(org.hibernate.tool.hbm2x.hbm2hbmxml.ManyToManyTest)
>junit.framework.AssertionFailedError
>at junit.framework.Assert.fail(Assert.java:47)
>at junit.framework.Assert.assertTrue(Assert.java:20)
This test was copied from other. It tests that generated foles exists and some GeneralHbmSettings.hbm.xml doesn't exists.

>testManyToMany(org.hibernate.tool.hbm2x.hbm2hbmxml.ManyToManyTest)
>java.lang.NullPointerException
at org.hibernate.tool.hbm2x.hbm2hbmxml.ManyToManyTest.testManyToMany(ManyToManyTest.java:78)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

>org.hibernate.tool.hbm2x.hbm2hbmxml.MapAndAnyTest
>testMetaValueRead(org.hibernate.tool.hbm2x.hbm2hbmxml.MapAndAnyTest)
>junit.framework.AssertionFailedError: Expected to get one meta-value element
>at junit.framework.Assert.fail(Assert.java:47)
>at junit.framework.Assert.assertTrue(Assert.java:20)
>at org.hibernate.tool.hbm2x.hbm2hbmxml.MapAndAnyTest.testMetaValueRead(MapAndAnyTest.java:130)
This will work only when JBIDE-3863 is fixed.

>testMapManyToAny(org.hibernate.tool.hbm2x.hbm2hbmxml.MapAndAnyTest)
>junit.framework.AssertionFailedError: Expected to get two meta-value elements expected:<2> but was:<0>
>at junit.framework.Assert.fail(Assert.java:47)
>at junit.framework.Assert.failNotEquals(Assert.java:280)
>at junit.framework.Assert.assertEquals(Assert.java:64) 
This means that many-to-any exported without meta-value. Need to fix this.

> Number of hbm genetation bugs
> -----------------------------
>
>                 Key: JBIDE-3712
>                 URL: https://jira.jboss.org/jira/browse/JBIDE-3712
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: Hibernate
>    Affects Versions: 3.0.0.CR2
>            Reporter: Dmitry Geraskov
>            Assignee: Max Rydahl Andersen
>             Fix For: 3.1.0
>
>         Attachments: patch.rar, SetManyToManyTest.java
>
>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jbosstools-issues mailing list