Orm help

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • alasdaircr
    replied
    Ah thanks, I totally wasn't aware of that standard, and since posting saw how it's handled with $joinTable in Modules/Crm/Services/Activities.php.

    Leave a comment:


  • yuri
    replied
    It's a commonly used standard where join table parts are sorted aplhabeticaly

    Leave a comment:


  • yuri
    replied
    use relationName in links definitions


    PHP Code:
    "links": {
            "contracts": {
                "type": "hasMany",
                "entity": "Contract",
                "relationName": "AccountContract"
            }
    } 
    
    That will create account_contract table

    Leave a comment:


  • alasdaircr
    started a topic Orm help

    Orm help

    Hi I've noticed after adding a new Entity type that the names for the join tables to other entities varies and this is the case for the existing modules:

    eg these exist by default:

    lead_meeting

    meeting_user

    this means it's hard to write shared code where you can reference tables using something like {$scope}_meeting

    Where could I fix this?
Working...