Closed keylime503 closed 10 years ago
Given an existing deck in the datstore, update its contents
I see this in the facade:
public void updateDeck(Deck newDeck) {
deleteDeck(newDeck.name);
storeDeck(newDeck);
return;
}
Will this actually work? Because right now I have 2 decks with the same name and I dont understand how a deck is uniquely identified. This is a problem we will have to deal with in editing deck names as well
Deck is uniquely identified by name AND userId
And I don't know if this will actually work, can't test it until there is a front-end form for updating deck meta-data i.e. deck name
So how do I have 2 decks with the same name, assuming the userId for both decks is the same as well?
Sorry, meant deck SHOULD be uniquely identified by those two things. But you're correct, there is nothing to stop you from adding two decks with the same name b/c datastore generates new Key for the second one. Right now, adding two decks w/ same name is a bug but I don't think its a high priority.
What exactly is this?