New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect delete scope when parent PK name incorrect in request body #10

Open
restsql opened this Issue Jun 10, 2012 · 0 comments

Comments

Projects
None yet
1 participant
@restsql
Copy link
Owner

restsql commented Jun 10, 2012

The delete of the children will fail to exclude the parent PK, increasing the scope inappropriately. The framework should complain that the parent is missing a valid PK attribute.

Example from trace.log:

---------------------
0:0:0:0:0:0:0:1 2012-06-10 11:57:42,354 DELETE /restsql/res/lang.LangFilm 200 12ms
   request:
{ "langs": [
                { "languge_id": "1001",
                        "movies": [
                                { "film_id": "1001" }
                        ]
                }
        ]
}
   sql:
DELETE FROM sakila.film WHERE film_id = 1001
---------------------

The deletes should include AND language_id = 1001 but do not because the PK name has a typo.

The framework should complain of the missing parent PK and return a 4xx error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment