aerial-framework/core

Workbench/doctrine plugin

cesaric opened this issue · 0 comments

If a child table has two different foreign keys referencing the same parent table, the yaml outputted has the same foreignAlias value for both. We could possibly create another doctrine directive in the Workbench comments similarly to who we address join tables. I may address this in the new Workbench file parser.

In the example below, one would need to manually change the second foreignAlias to "pendingUserAttribues" or like "userAttributes2" (appending a number could be automated):

UserAttribute:
tableName: UserAttribute
columns:
...
...
relations:
InputLookup:
class: InputLookup
local: inputLookupId
foreign: id
foreignAlias: userAttributes
onDelete: cascade
onUpdate: cascade
PendingInputlookup:
class: InputLookup
local: pendingInputlookupId
foreign: id
foreignAlias: userAttributes
onDelete: cascade
onUpdate: cascade