Skip to content

Issues with two Repositories that use LockingAndVersioningRepository after locking 1 in each the delete of the lock can be called from either repo #2153

@rhhaley

Description

@rhhaley

We are using 3.1.4

I have two Repositories that extend LockingAndVersioningRepository after locking 1 in each repo with the same @id (which is the entity_id) in a test then delete of the lock of either it deletes the lock from the lock table.

A little background:
We have two types with content and our goal is to be able to version both.

  1. Products
  2. Attachments

Steps to reproduce the behavior:

  1. Create two entities with @id that are autoincrementing Integers.
  2. Create one of each in a fresh database. This should show that each id is 1.
  3. Lock one.
  4. Check the lock table you should see entity_id will equal 1.
  5. Lock the other but notice the lock owner doesn't get set on the second entity (not seeing any error).
  6. You'll see there is only one lock in the locks table and with the entity_id = 1.
  7. Call unlock on either repository and you'll see the lock in the lock table be deleted.

Is there a way to make the entity_id to use a custom property.

We are an ex Documentum shop and want to us a similar id structure for document based entities.

Let me know if more info is needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions