Added ImportIndex annotation and support for updating DB instead of just inserting#10
Added ImportIndex annotation and support for updating DB instead of just inserting#10jp31415926 wants to merge 2 commits intojdewit:masterfrom
Conversation
…ust adding records
|
Updating your db with a csv?? I don't think this is a very good idea. The first import would work, but how does the second import account for any rows added by the application? You would have to manually map the id's or generate unique id's instead of having them increment. |
|
Look at the code. It loads a record that matches the index-annotated This is something we use all the time to upload game schedules. Some On 1/5/13, jdewit notifications@github.com wrote:
|
|
Let me just add that if the user does not annotate any fields as ImportIndex then the import works exactly as it did before. |
I needed a way to import changes to existing records instead of deleting them by hand and then importing. This code does that by annotating "ImportIndex" fields that are used to find an existing and update it (if it exists).
Also removed unneeded table in the import template and other minor changes.
Hope you can use it.