codesmithtools / Templates

CodeSmith Generator Templates
http://www.codesmithtools.com/product/generator
54 stars 35 forks source link

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

Closed GoogleCodeExporter closed 4 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

stale[bot] commented 4 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.