0 votes

Hi Ludek,
we normally generate mapping files from ormdesigner into our application.
I know import mapping files into ormdesigner is also possible.
But we want to use an existing bundle in our application, which contains some mapping files and entities.
Is it also possible to import only those entities into my existing ormdesigner file, without touching the already existing entities?

Thanks,

Danny

in Feature Request by (150 points)
recategorized by

1 Answer

0 votes
Best answer

Hi Danny,
ORM Designer allows you to do this using the Import to Project function. Just load the existing ORM Designer project and import the new mapping files as follows:

enter image description here

enter image description here

Confirm the import and its done. ORM Designer will now merge the new entities with existing project.
If you have any further questions, just let me know.

Martin

by Skipper developer (74.8k points)
selected by

Hi Martin,

the thing is, they have split up configuration of the entity over mapping files and entity files. So relation fields are in the entity files, en data fields are in the mapping files.
Can I upload the files so you can see what I mean?
Any way to get this complete scheme into my existing project?
I tried your solution, but it only reads the mapping files.

Thanks,

Danny

Hi Danny,

you can send the files to [email protected].
We will check the situation and I will let you know what we have found.

Martin

Hi Danny,

from the files and attached description we understand following:
For example in the Thread.orm.xml file you want to save entity definitions and its fields, and you want associations of this entity separately stored in the thread.php file.

Unfortunatelly this solution is not possible. ORM Designer does not support import/export of one entity from more than one file because:

  • Splitting definitions between more locations is not safe way do store data and it may negativelly affect integrity of the model and cause errors.
  • We have not met this way of storing definitions before and I'm not sure if this solution is supported by Doctrine2 at all.

We also checked the thread.php and there are no @ORM annotations to define the associations.

We would strongly recommend choosing single format for storing complete definitions of entities.
If you need to change the format of definitions, you can simply change the type of modules from XML to annotations and vice-versa and the data will be generated automatically.

Martin