0 votes

Hi.

I've just upgraded from ORM Designer 1.4.6.488 to 2.1.12.719 and am in the process of converting some Symfony1 diagrams (which export as a single schema.yml file).

In ORM Designer 1.4.6.488 when I created a many-to-many relationship a 'link' entity was correctly created, with two one-to-many relationships:

Image caption

I was then able to edit one of the one-to-many relationships if I wanted to customise the alias:

Image caption

When the schema.yml file was exported under ORM Designer 1.4.6.488, this would generate two relations:

EarlyInterventionPartnerSchool:
  columns:
    id:
      primary: true
      unique: true
      type: integer
      notnull: true
      autoincrement: true
    partner_id:
      type: integer
      notnull: true
    school_id:
      type: integer
      notnull: true
  relations:
    Partner:
      class: EarlyInterventionPartner
      local: partner_id
      foreign: id
    School:
      class: EarlyInterventionSchool
      local: school_id
      foreign: id

However, when I imported the .ormdesigner file into 2.1.12.719 I've noticed that these relations are not exported to the schema.yml:

EarlyInterventionPartnerSchool:
  columns:
    id:
      unique: true
      primary: true
      type: integer
      notnull: true
      autoincrement: true
    partner_id:
      type: integer
      notnull: true
    school_id:
      type: integer
      notnull: true

So the relationships are lost :(

In ORM Designer 2.1.12.719, when I look at the same many-to-many relationship, I see the same link entity with two one-to-many relationships, but if I double-click either of the one-to-many relationships I am only able to edit the overall many-to-many relationship that has been modelled:

Image caption

Can someone please tell me whether this is a known problem or a feature, and how best can I import my ORM Designer 1.4.6.488 so that it reliably generates these all-important 'relations' in the schema.yml file?

Thanks

in Solved by (210 points)
recategorized by

1 Answer

0 votes
Best answer

Hi Dave,

you're right with your observation how ORM Designer2 handles many-to-many associations.

The reason is that original ORM Designer used two separate associations and above that constructs many-to-many. The original solution unfortunately brought several disadvantages so we decided to reimplement many-to-many as standalone object. Thanks for this now it is possible to distinguish between associations leading to MN table and many-to-many associations which only using MN table.

Anyway back to your problem. It's hard to tell more specificaly what's going wrong in your case without deeper knowledge of your project, but there are several possible reasons:

  • ORM Designer has converted your two old associations and one MN entity to a new single MN association object, your original association leading from entities MN entity have been removed and only one new MN association is generated to owner side of your entity. (so instead of E1->MN and E2->MN assocs is generated only E1->E2 in owner side).

  • it's possible that ORM Designer has incorrectly imported your old project because of some uncommon configuration. If this is your case, would it be possible to send us a part of your original v1 project where E1,E2 and MN table is defined, so we can check it?

by Skipper developer (141k points)
selected by