facebook

Code generation problemr with associations

  1. MyEclipse Archived
  2.  > 
  3. UML Development
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #278933 Reply

    Ulrich Cech
    Member

    Hello,

    I just have a problem with the association modelling. If I want to generate the Java code for a simple Class1(1)-to-Class2(n) association, there is always a “Vector” inserted in the java class (but I have set the option in the preferences to “Array List”).

    If I work without associations and make “simple properties” for the associations, the code generations works correctly (but then I only have separate entities in the diagram without any associations).

    Can you give me an advice, how to get it work correctly?

    Thanks in advance,
    Ulrich

    #278971 Reply

    Loyal Water
    Member

    Ullrich,
    Can you send me a sample UMR with the class diagram and association. Im not sure if I understood the problem.

    #279098 Reply

    Loyal Water
    Member

    This message has not been recovered.

    #279559 Reply

    Loyal Water
    Member

    Hi Ulrich,
    Sorry for the delay in my response. I was able to reproduce this condition at my end as well and I have asked the dev team to take a look at this. They will get back to you.

    #279560 Reply

    Ulrich Cech
    Member

    Hi Nipun,
    thanks for your support.

    #279561 Reply

    Loyal Water
    Member

    Your Welcome..

    #280838 Reply

    Ulrich Cech
    Member

    Hi Nipun,

    can you give me a short appreciation when this issue could be solved? I want to start a new project and I would like to use the UML-Tool from ME for designing.

    Thanks for your support…

    #280945 Reply

    Loyal Water
    Member

    The fix for this issue is being targeted for the MyEclipse 6.5 release. Thank you for your patience.

    #286467 Reply

    Ulrich Cech
    Member

    Hi,

    I just updated to ME 6.5, but the UML-related problems with associations are currently not fixed.
    1. It doesn’t matter, what you choose in UML-settings code generation (Vector, ArrayList, LinkedList), the code-generator always uses Vector
    2. It is also not typically to use concrete collection implementation (to choose from List, Set, Map would be more practically; the present code-generation for example is unusable if you use hibernate)
    3. the name for the association is used in the code-generator for both ends (if it is a bidirectional association); this is also not practical
    4. if you set the base namespace for the model, the code-generator doesn’t care and generates the classes in the “default” package

    In summary,with these issues the UML-part is not really useful/helpful in real application development (it is ok if you use it only for some simple graphical overviews, but code-generation should be avoided).

    #286661 Reply

    Loyal Water
    Member

    I’m sorry this issue exists in MyEclipse 6.5 as well but the management didn’t prioritize it for the 6.5 release. I’ll try and push it for our next release.

Viewing 10 posts - 1 through 10 (of 10 total)
Reply To: Code generation problemr with associations

You must be logged in to post in the forum log in