Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PopulateMergeMatch with HasOne? #14

Open
nebucaz opened this issue Jan 1, 2016 · 2 comments
Open

PopulateMergeMatch with HasOne? #14

nebucaz opened this issue Jan 1, 2016 · 2 comments

Comments

@nebucaz
Copy link

nebucaz commented Jan 1, 2016

Might be this might be more of a feature request than an issue: I tried to define a PopulateMergeMatch using ForeignKey Fields, but it did not work. I tried the following yams-code (Mandant & Plan are separate Objects)

Contract:
  bronze:
    Start: '2016-01-01 00:00:00'
    End: '9999-12-31 23:59:59'
    Mandant: =>Mandant.default
    Plan: =>Plan.test
    PopulateMergeMatch:
      - Plan
      - Mandant

This throws a n SQL-Error Unknown column 'Plan' in 'where clause' because there is no such column in the Database. Changing the merge-fields to database-Columns like this:

PopulateMergeMatch:
  - PlanID
  - MandantID

yields a php runtime error of ERROR [Notice]: Undefined index: MandantIDbecause this field is not found in the yams definition. I can not use
PopulateMergeWhen: "MandantID = =>Mandant.default AND PlanID = =>Plan.test"
because the yaml -references will not be replaced with the real values.

Any idea how to achieve this?


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@NZI
Copy link

NZI commented Feb 26, 2018

I can confirm that this is an issue too

@wernerkrauss
Copy link
Contributor

@nebucaz is "Plan" and "Mandant" a has_one relation? Did you try domething like

Contract:
  bronze:
    Start: '2016-01-01 00:00:00'
    End: '9999-12-31 23:59:59'
    MandantID: =>Mandant.default
    PlanID: =>Plan.test
    PopulateMergeMatch:
      - Plan
      - Mandant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants