pomm-project / ModelManager

Model Manager for the Pomm database framework.
MIT License
66 stars 27 forks source link

Choose not to return the projection of the query #76

Closed monpetitjules closed 7 years ago

monpetitjules commented 7 years ago

For security reasons I want to query a table with a Postgresql role that has only insert permission (the user is not the owner of the table).

As every Pomm WriteQueries returns the projection, I get the following error message: ERROR: permission denied for relation table.

The role must also have "select" permission to return the projection.

Would it be possible to choose not to return the projection of queries (it could just return true or false instead) in order to use a role without select permission?

Thanks.

chanmix51 commented 7 years ago

You do not want to use the model manager for those queries do you? Do you think an entity should be hydrated with the query result? IMHO, the QueryManager should be fine.

chanmix51 commented 7 years ago

Can we close this issue?