AnantLabs / codesmith

Automatically exported from code.google.com/p/codesmith
1 stars 0 forks source link

Support of Delete by uniqe Key instead only by primary key #687

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Currently Plinqo allows only delete by primary key, but it should have also the 
ability to delete by unique key.

I have got a table with an ID (unique) and a combination of two other keys 
which are my primary key.
Now I would like to execute the delete method by using this unique ID, instead 
of sending two keys per record.

Additionally it would be perfect to delete a whole bunch of records instead of 
deleting only one by one (I tried this but it produced a never ending loop).

I manually created an additional class which I call to delete by my unique key 
records, but it would be great if you could implement it in the template.

Original issue reported on code.google.com by Athur...@GMX.de on 3 Jun 2013 at 7:45

GoogleCodeExporter commented 9 years ago
Hello,

Can you please provide a sample sql schema of the table with the unique id. How 
is this id unique? Index/fk?? How would you know for sure that only one record 
was deleted by this id if it's not part of the pk?

Original comment by bniemyjski on 7 Jun 2013 at 7:02