server/repository.py
branchstable
changeset 4687 082e66184f71
parent 4686 c55606a5c4b0
child 4689 4eb1f4490538
equal deleted inserted replaced
4686:c55606a5c4b0 4687:082e66184f71
   100 
   100 
   101     this kind of behaviour has to be done in the repository so we don't have
   101     this kind of behaviour has to be done in the repository so we don't have
   102     hooks order hazardness
   102     hooks order hazardness
   103     """
   103     """
   104     # XXX now that rql in migraction default to unsafe_execute we don't want to
   104     # XXX now that rql in migraction default to unsafe_execute we don't want to
   105     #     skip that anymore. Also we should imo rely on the orm to first fetch
   105     #     skip that for super session (though we can still skip it for internal
   106     #     existing entity if any then delete it
   106     #     sessions). Also we should imo rely on the orm to first fetch existing
   107     #if session.is_super_session:
   107     #     entity if any then delete it.
   108     #    return
   108     if session.is_internal_session:
       
   109         return
   109     card = session.schema_rproperty(rtype, eidfrom, eidto, 'cardinality')
   110     card = session.schema_rproperty(rtype, eidfrom, eidto, 'cardinality')
   110     # one may be tented to check for neweids but this may cause more than one
   111     # one may be tented to check for neweids but this may cause more than one
   111     # relation even with '1?'  cardinality if thoses relations are added in the
   112     # relation even with '1?'  cardinality if thoses relations are added in the
   112     # same transaction where the entity is being created. This never occurs from
   113     # same transaction where the entity is being created. This never occurs from
   113     # the web interface but may occurs during test or dbapi connection (though
   114     # the web interface but may occurs during test or dbapi connection (though