Hi,

yesterday I checked the usage of MagicDraw 12.5 vs. 15.0 with the Hibernate
Fornax-Cartridge because I heard there are some problems between these two
versions, especially with associations/dependencies and the EMF UML2 (v2.x)
XMI export.

If I use MD 15.0, means I open the reference-model.mdzip in MagicDraw and
export the model as EMF UML2 (v2.x) XMI and run the generator with this
exported model, I will get compile errors in the Java class
packageA.packageB.EmbeddedB in the hashCode() operation. Below the two
different versions of generated java code:

original:
>>>
public int hashCode() {
        final int PRIME = 7;
        int result = 1;
        long temp;

        result = PRIME
                        * (result + ((property1 == null) ? 0 : 
property1.hashCode()));

        result = PRIME
                        * (result + ((embeddedC == null) ? 0 : 
embeddedC.hashCode()));

        result = PRIME * (result + property2);

        result = PRIME
                        * (result + ((property3 == null) ? 0 : 
property3.hashCode()));

        result = PRIME
                        * (result + ((property4 == null) ? 0 : 
property4.hashCode()));

        return result;
}
<<<

MagicDraw 15.0:
>>>
public int hashCode() {
        final int PRIME = 7;
        int result = 1;
        long temp;

        result = PRIME
                        * (result + ((property1 == null) ? 0 : 
property1.hashCode()));

        result = PRIME
                        * (result + ((embeddedC == null) ? 0 : 
embeddedC.hashCode()));

        result = PRIME * (result + property2);

        result = PRIME * (result + property3);

        result = PRIME * (result + property4);

        return result;
}
<<<

Complile error: 

The operator + is undefined for the argument type(s) int, Date
fornax-cartridges-uml2-hibernate-referenceMD150/src/generated/java/packageA/packageB
EmbeddedB.java  line 179
The operator + is undefined for the argument type(s) int, Time
fornax-cartridges-uml2-hibernate-referenceMD150/src/generated/java/packageA/packageB
EmbeddedB.java  line 177


My environment:
OAW 4.2
Hibernate Cartridge SVN checkout - generator revision 3337


It is no problem for me, because at the moment I don't use the embedded
feature of the cartridge. 
I only want to post this problem/bug? maybe it is useful for someone else.


Regards,

Nils
-- 
View this message in context: 
http://www.nabble.com/-Hibernate--Problems-with-MagicDraw-15.0-tp16627773s17564p16627773.html
Sent from the Fornax-Platform mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Fornax-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fornax-developer

Reply via email to