Skip to content
This repository has been archived by the owner on Feb 5, 2024. It is now read-only.

Returning the object's RID upon INSERTion #148

Open
odino opened this issue Jan 8, 2013 · 4 comments
Open

Returning the object's RID upon INSERTion #148

odino opened this issue Jan 8, 2013 · 4 comments

Comments

@odino
Copy link
Member

odino commented Jan 8, 2013

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)

@lvca
Copy link

lvca commented Jan 8, 2013

OrientDB already supports it.

@odino
Copy link
Member Author

odino commented Jan 8, 2013

thanks for clarifying man, I wasnt 100% sure

@davidino
Copy link
Member

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;
        }
        ...

@odino
Copy link
Member Author

odino commented Jan 13, 2013

@davidino, why not implements a ReturningCommand interface for Select and Insert ?

Then we can do an instanceOf ReturningCommand

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants