Open fabioginzel opened 9 years ago
I don't understand what you're reporting. Are you talking about embedded data in ODM? Is this PUT or PATCH? What does tppdvi represent?
Tppdvi is a embedded doctrine entity and apigility allows to change the descricao field.
That's interesting. Are you using ODM or ORM? Is there more about this you can add?
I called a translator.
I'm using apigility with doctrine. When I send a patch to the main entity I'm trying to update, it's also updating an embedded entity.
For example, let's say we have a students table and a courses table. The student entity has it's course embedded.
When I patch the student entity, if somehow the course entity name is changed, it updates the course name on the courses table.
Database = MySQL? MongoDB?
I've tested on MS Sql Server and PostgreSql.
@veewee what do you think of this? Are your hydrators too good?
any news on this? I like the Idea of Posting directly to the subentities but i think there is a need to call the input validators of the nested entity, otherwise you'll run into errors.
@veewee bumping this. I'd sure appreciate your insight on this.
Hi @TomHAnderson Sadly, I haven't found the time to follow this repo up to the latest version. It's exactly the same as with forms: if you submit the field: tppdvi[descricao]=test, the field will be updated in the database. I am perfectly fine with this feature and am using this on some projects.
If you don't want this feature, you can filter / validate the input yourself on pre-update ?
But if my user dont have permission to change embbeded entity?
@fabioginzel @veewee ping
hi
@fabioginzel do you still need any help with it or you have found the solution?
This repository has been closed and moved to laminas-api-tools/api-tools-doctrine; a new issue has been opened at https://github.com/laminas-api-tools/api-tools-doctrine/issues/9.
He should not allow change embbeded entities, like this: {"id":"3", "descricao":"name", "tppdvi":{"id":"1", "descricao":"update name"} }