Self Link Bug

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mijomft16
    Junior Member
    • Jul 2015
    • 18

    Self Link Bug

    If you link accounts with a many to one relationship to accounts, in order to create sub accounts, you receive the following errors
    (
    [controller] => Account
    )
    , InputData: {"assignedUserId":"55842079f35490a38","assignedUse rName":"Niko Nickname","name":"jkoj","phoneNumberData":[{"phoneNumber":"5555555555","primary":true,"type": "Office"}],"phoneNumber":"5555555555","emailAddressData":[],"emailAddress":null,"website":"","billingAddressP ostalCode":"","billingAddressStreet":"","billingAd dressState":"","billingAddressCity":"","billingAdd ressCountry":"","shippingAddressPostalCode":"","sh ippingAddressStreet":"","shippingAddressState":"", "shippingAddressCity":"","shippingAddressCountry": "","type":"","industry":"","accountName":null,"acc ountId":null,"description":"","teamsIds":[],"teamsNames":{}} - SQLSTATE[42000]: Syntax error or access violation: 1066 Not unique table/alias: 'account' [] []
    [2015-07-10 14:28:32] Espo.ERROR: Display Error: SQLSTATE[42000]: Syntax error or access violation: 1066 Not unique table/alias: 'account', Code: 42000 URL: /api/v1/Account [] []
    [2015-07-10 14:28:41] Espo.ERROR: API [GET]:/:controller, Params:Array
    (
    [controller] => Account
    )
    , InputData: - SQLSTATE[42000]: Syntax error or access violation: 1066 Not unique table/alias: 'account' [] []
    [2015-07-10 14:28:41] Espo.ERROR: Display Error: SQLSTATE[42000]: Syntax error or access violation: 1066 Not unique table/alias: 'account', Code: 42000 URL: /api/v1/Account?maxSize=40&offset=0&sortBy=name&asc=true [] []
    [2015-07-10 14:28:44] Espo.ERROR: API [GET]:/:controller, Params:Array

    the same will occur if you link contacts or tasks to themselves in order to create sub tasks...

    is there any solution to this?

    the 42000 is usually a error caused by a mysql reserved name or keyword being used, ex Name
    yet Name is a default field for those entities and the only customization done to account, tasks, or contacts was just the self link...

    is there any solution to this?
  • yuri
    Member
    • Mar 2014
    • 8453

    #2
    You should name 'accountParent' or something other than 'account'
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    Working...