Revision 785
Added by bojilova over 23 years ago
src/edu/ucsb/nceas/metacat/DocumentImpl.java | ||
---|---|---|
1009 | 1009 |
|
1010 | 1010 |
Statement stmt = conn.createStatement(); |
1011 | 1011 |
stmt.execute("DELETE FROM xml_index WHERE docid = '" + docid + "'"); |
1012 |
stmt.execute("DELETE FROM xml_documents WHERE docid = '" + docid + "'"); |
|
1013 | 1012 |
//stmt.execute("DELETE FROM xml_access WHERE docid = '" + docid + "'"); |
1014 | 1013 |
stmt.execute("DELETE FROM xml_access WHERE accessfileid = '" + docid + "'"); |
1015 | 1014 |
stmt.execute("DELETE FROM xml_relation WHERE docid = '" + docid + "'"); |
1015 |
stmt.execute("DELETE FROM xml_documents WHERE docid = '" + docid + "'"); |
|
1016 | 1016 |
stmt.close(); |
1017 | 1017 |
conn.commit(); |
1018 | 1018 |
conn.setAutoCommit(true); |
Also available in: Unified diff
moved delete from xml_relation before delete from xml_documents
because of the parent-child relation b/w these 2 tables