On Nov 21, 8:37 am, Fabio Maulo <
fabioma...@gmail.com> wrote:
> and it will load the entity
> session.CreateQuery("delete from YourEntity y where y.Id =
> :pId)").SetInt32("pId", 5).ExecuteUpdate();
> will NOT load the entity (and does not work with cascade)
>
>
>
>
>
>
> > Ah, nevermind, it seems to require qualified name.
>
> > On Nov 21, 8:05 am, epitka <
exptrade2...@yahoo.com> wrote:
> > > There is a Delete overload that accepts EntityName and Id. But was is
> > > this EntityName? Is it name of the class or what? I am asking because
> > > if I do Session.Delete("MetaProject", id) i get an error
>
> > > NHibernate.MappingException: No persister for: MetaProject
> > > at NHibernate.Impl.SessionFactoryImpl.GetEntityPersister(String
> > > entityName)
> > > at NHibernate.Impl.SessionImpl.GetEntityPersister(String entityName,
> > > Object obj)
> > > at NHibernate.Event.Default.DefaultDeleteEventListener.OnDelete
> > > (DeleteEvent event, ISet transientEntities)
> > > at NHibernate.Event.Default.DefaultDeleteEventListener.OnDelete
> > > (DeleteEvent event)
> > > at NHibernate.Impl.SessionImpl.FireDelete(DeleteEvent event)
> > > at NHibernate.Impl.SessionImpl.Delete(String entityName, Object obj)
> > > at
>
> > dnnSphere.MetaTests.PersistenceSpecificationTests.MetaProjectTest.TearDown
> > > () in MetaProjectTest.cs: line 127
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "nhusers" group.
> > To post to this group, send email to
nhu...@googlegroups.com.
> > To unsubscribe from this group, send email to