PDA

View Full Version : prevent duplicates in store



moegal
5 Mar 2010, 3:21 PM
Is there anything built into store to prevent duplicates? Or does anyone have an override for store that will allow me to set a property like allowDuplicates: false (true by default)

This would be handy.

Thanks, Marty

Animal
5 Mar 2010, 3:33 PM
Stores already do not allow >1 Record with the same ID.

Add a new Record with the same ID as an existing Record, and the new one takes over the ID->Record mapping.

moegal
5 Mar 2010, 4:19 PM
Animal,

I didn't realize this. I have been adding records to a store and I was letting it auto create the id.

Thanks!
Marty