orientdb-odm
orientdb-odm copied to clipboard
Returning the object's RID upon INSERTion
Serious issues: when we do an insert, there is no way to get the RID of the inserted record.
This means that if you need to insert and then output the RID or just insert and then link the inserted object to another record with a link, you need to do an extra query.
~~I think~~ OrientDB supports returning the RID when you do an INSERT, so lets add this capability,
~~if not, we should talk to @lvca and request for this feature (I seriously doubt its missing)~~
OrientDB already supports it.
thanks for clarifying man, I wasnt 100% sure
i'm also facing with this problem for the persistence part.
The problem is that for now only for the "select" command we'll wait for Return
public function shouldReturn()
{
if ($this->getCommand() instanceOf Select) {
return true;
}
...
@davidino, why not implements a ReturningCommand interface for Select and Insert ?
Then we can do an instanceOf ReturningCommand