Skip to content
  • Sylvain Thénault's avatar
    [schema] Fix definition of the container relation · a88deb387b2b
    Sylvain Thénault authored
    Cardinality and permissions defined on the relation type wasn't considered as
    expected because the relation is added dynamically in post_build_callback. We
    have to set them explicitly there.
    
    This added to a bug in the cloning code led to entities with several containers.
    To fix this, migration script pick the container with the greatest eid since it
    should be the one which is not unexpectedly copied. Anyway, even if that's wrong
    that's no big deal because there are only demo instances for now which don't
    really care of data loss.
    
    This patch also set properly cardinality on container relation for
    SEDAArchiveUnit, which is expected to be optional while mandatory for others.
    This has not been detected before since it wasn't actually mandatory by default
    before this patch.
    a88deb387b2b