Doctrine 1
  1. Doctrine 1
  2. DC-905

Fields with foreign key shouldn't require definition

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Sample schema attached.

      Now, keeping attached schema in mind.

      We have core tables that lots of other tables refer via foreign keys to them, like user, company, etc.

      We need to explicitly define foreign keys (like user_id) "definitely same as" User.id on each table. By design, this seems unnecessary, and has load on refactoring processes, ie. type change on User.id.

      Doctrine is already parsing foreign relations from schema, It can use parent table field definition (User.id) in refering table fields (user_id) and on the schema user_id can be defined as:

      user_id: ~

      1. schema.yml
        1 kB
        Alaattin Kahramanlar

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Roman S. Borschel
            Reporter:
            Alaattin Kahramanlar
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: