I'm looking into fixing the bug, not that it is a big deal as even a
million orphaned EntityReferences records won't take up that much
space.

So I've forked the repo and I'm looking at the code in
AuthorizationRepository and the hbm mapping files.  At first I thought
it could be solved by a well placed cascade attribute in an hbm file,
but the EntityReferences table is kind of a junction table between
different types of entities and the EntityReferencesToEntitiesGroups
table, which is itself a junction table to EntitiesGroups.  Do you
think it is possible for a cascade setting to delete that kind of
orphan?

Dan

On Sep 22, 4:38 pm, Ayende Rahien <[email protected]> wrote:
> Looks like a bug
>
>
>
> On Wed, Sep 22, 2010 at 7:50 PM, Dan <[email protected]> wrote:
> > When I add an entity object to a system I also often associate the
> > entity with an entity group.  Then when deleting an entity I first
> > detach the entity from any groups to which it belongs.  This works in
> > that I can delete the entity object and the appropriate record from
> > EntityReferencesToEntitiesGroups is removed, but associating an entity
> > to an entity group also enters a record into the EntityReferences
> > table, but this record isn't removed when detaching the entity from
> > the group or deleting the entity object.
>
> > Is there something I'm missing when removing an entity from a system
> > that uses Rhino.Security?
>
> > There is a RemoveUser method in IAuthorizationRepository that cleans
> > out any references to an IUser entity object, but is there something
> > similar for general entities?
>
> > Thanks
> > Dan
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Rhino Tools Dev" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<rhino-tools-dev%2Bunsubscribe@ 
> > googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/rhino-tools-dev?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Rhino Tools Dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rhino-tools-dev?hl=en.

Reply via email to