Forums / Developer / Storing relations in SQL base

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

Storing relations in SQL base

Author Message

Vladimir Shiray

Thursday 11 August 2005 2:33:58 am

I has found that our production EZ base
contains duplicate records in the
'ezcontentobject_link' table.
I say about combination of three fields:
from_contentobject_id
from_contentobject_version
to_contentobject_id

Has it a sense?
Can it be a reson for any problem?
Is it possible to create UNIQUE key
based on these fields?

I removed duplicates in test copy with
direct SQL query:

DELETE FROM ezcontentobject_link
WHERE id NOT IN (
SELECT max(id)
FROM ezcontentobject_link
GROUP BY from_contentobject_id, from_contentobject_version, to_contentobject_id
);

Can it lead to a problem ?