Rickard, There is a difference between uow.remove( entity ) and entity.remove().
If the entity is created within the same uow session that calls the uow.remove(), then there will be an exception that the entity doesn't exist. But calling entity.remove() works. I think it is due to UnitOfWorkInstance.remove( entity ) doesn't remove the instanceCache entry, but not totally sure. Another question is whether we should have both or not... I am not convinced either way. Well, looking more closer it seems that the concerns of who does what is a bit mixed up. I think this is a fix we need for 1.0. Cheers -- Niclas Hedhman, Software Developer http://www.qi4j.org - New Energy for Java I live here; http://tinyurl.com/2qq9er I work here; http://tinyurl.com/2ymelc I relax here; http://tinyurl.com/2cgsug _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

