CRM-13990 improve custom data and custom fields structure

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Incomplete
    • Affects Version/s: Unscheduled
    • Fix Version/s: Unscheduled
    • Component/s: Doctrine Integration
    • Labels:
      None
    • Documentation Required?:
      None
    • Sprint:
      Sprint 2
    • Funding Source:
      Needs Funding

      Description

      • how can we make doctrine aware of newly created tables for custom groups, so that we can directly perform CRUD operations
      • can we inject them into cached meta data??

        Attachments

          Activity

          [CRM-13990] improve custom data and custom fields structure
          Donald A. Lobo added a comment -
          • did a fair bit of web searching for this and could not find anything specific to this. Also asked in the doctrine irc channel (no response as yet)
          • based on my reading and understanding. If we want to expose the full power of doctrine and consider the custom tables as first class tables, then we need to generate the entity file(s) and expose them to doctrine.We can then use those entity files to update/maintain the schema. Handling: insert/delete of a new column is relatively easy (just add or remove the corresponding field). We currently dont allow changing the data type
          • We'll need to consider how/where to write these generated entities. Maybe in the symfony cache directory and regenerate them as needed. We'll need to add this path to the doctrine autoloader path. Doing so, will automatically give us the rest api and potentially also allow us simple crud operations based on sonata admin etc. So might be worth tackling for the first part of the project.
          • For the short/medium term, we can bypass doctrine and do this directly via PDO. However when we do a complete switchover and always go through doctrine, we'll need to make these custom tables first class entities so they can be used in DQL and other doctrine/symfony stuff.

            People

            • Assignee:
              Unassigned
              Reporter:
              Kurund Jalmi

              Dates

              • Created:
                Updated:
                Resolved: