We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm very new to Google's DataStore.
I want to make a list of my books with a button to delete the books I want.
But for this, I need to create a route to eliminate them:
$books= new GDS\Store('Book'); foreach($books->fetchAll() as $book) { ?> <h2><?php echo $book->title; ?> <a href="/delete/<?php echo $book->key; ?>">Delete</a></h2> <?php }
How do I create a route with the unique ID of the book ?. Is there any way to make automatic IDs ?.
The text was updated successfully, but these errors were encountered:
It is with $book->getKeyId() ?
That id is unique?
Sorry, something went wrong.
And another silly question. The foreign keys do not exist ?.
Do I have to create them manually and do it by php always?
If you have inserted (upserted) without specifying a Key Name, then yes - getKeyID is the unique key.
getKeyID
Datastore supports a hierarchical reference system - ancestry.
If you just want reference entity "X" from entity "Y", then you are usually best to just store the Key ID (or name) in a string field.
No branches or pull requests
I'm very new to Google's DataStore.
I want to make a list of my books with a button to delete the books I want.
But for this, I need to create a route to eliminate them:
How do I create a route with the unique ID of the book ?. Is there any way to make automatic IDs ?.
The text was updated successfully, but these errors were encountered: