You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2019/05/14 20:55:09 UTC

[GitHub] [trafficcontrol] rob05c edited a comment on issue #2494: Multiple Go API endpoints don't return "joined" fields on PUT/POST

rob05c edited a comment on issue #2494: Multiple Go API endpoints don't return "joined" fields on PUT/POST
URL: https://github.com/apache/trafficcontrol/issues/2494#issuecomment-492405971
 
 
   >The same issue exists for profileparameters
   
   I believe this is a problem for all endpoints using the "CRUDer" framework and "Generic" funcs (and possibly more).
   
   For the CRUDer/Generic endpoints, we should be able to fix it in all of them at once, by 
   1. changing the Generic funcs to expect queries to return the whole object
   2. using sqlx.StructScan to read the result of the insert/update
   3. changing each endpoint's queries to return the values in a RETURNING clause.
       - for objects with values in other tables, RETURNING can only return columns in the inserted table - this can be worked around by wrapping the INSERT/UPDATE in a WITH statement.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services