Book a Demo

Author Topic: CodeGeneration especially php  (Read 3414 times)

ChristianO

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
CodeGeneration especially php
« on: November 09, 2004, 12:20:21 pm »
I want to generate Code with EA from a class diagram. I have already modelled a few classes and tried to get the generated code.

All Associations modelled are not avaible in the php code. I have empty classes with a constructor, the attributes and empty methods. No Set/Get Methods, No Containers, No Variables associated to other classes.

I have choosen bidirectional associations, but the result was the same.

I tried Java instead and was surprised getting a similar bad result. Now i don't know wether EA in Version 4.0 is not capable to generate the complete modelled code or there's a wrong or missing setting.

I hope you can deal with my English

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: CodeGeneration especially php
« Reply #1 on: November 09, 2004, 03:42:32 pm »
Hi,

If modelling with associations you will have to manually create the get/set methods that you want.  Alternatively you could model the attributes both as attributes in the class and with associations.  Then in the attributes dialog, click the 'property' checkbox for EA to create get/set methods for that attribute.

Another thing that could be causing you a problem is the association direction.  If the direction is unspecified and you want attributes created then make sure you have the "Do not generate members where association direction is 'unspecified'" option (Tools | Options | Generation) unset.

Have a look in the help under the 'code template framework' to learn about how the code generation works and then if you want to you can look at all the code templates and customize them to do what you want.

Further, since version 4.0 there have been quite a few updates, fixes etc that could help.  Have a look at the latest news section of this forum to see what has been changed since your version of EA.

By the way your English is fine.

Simon