On Tue, Mar 5, 2013 at 8:18 PM, Jose Blanco <blan...@umich.edu> wrote: > Today in my development environment I tried to delete a collection and got > this error: > > org.postgresql.util.PSQLException: ERROR: update or delete on table "item" > violates foreign key constraint "$2" on table "communities2item" > Detail: Key (item_id)=(216864) is still referenced from table > "communities2item". > > I looked at the item table and see that the contstraint is there, but if I > look at the schema file in in 30, I see no constraint of the sort. Should I > get rid of the constraint from the item table? Is communities2items updated > every time the browse is update? How do entries get into communities2item?
Hi Jose, AFAICT, communities2item is used only in these 2 places: https://github.com/DSpace/DSpace/blob/dspace-3.1/dspace-api/src/main/java/org/dspace/search/Harvest.java https://github.com/DSpace/DSpace/blob/dspace-3.1/dspace-api/src/main/java/org/dspace/browse/BrowseEngine.java So it seems the only thing it's used for is determining which items have been added/removed/changed within a community, which is implemented in the following use cases: * OAI server (only up to DSpace 1.8) * user's subscription notification * JSPUI feeds The table is not created staticaly, i.e. not in database_schema.sql. The class that seems to fill this table seems to be the BrowseDAO (e.g. BrowseDAOPostgres). I'm not sure how to forcibly invoke it, but index-update or index-init would be a safe bet. Regards, ~~helix84 Compulsory reading: DSpace Mailing List Etiquette https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette ------------------------------------------------------------------------------ Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev _______________________________________________ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette