sessionfactory.evict not work

Description

Hi,

I trying evict a entity from second level cache, but sessionfactory.evict not work well, not evict the entity.
code.

Dim listaOficiales As IList(Of Oficial) = ServidorDominio.Entidades.Oficiales.GetAll
Dim oficialConcreto As Oficial = listaOficiales.Item(0)
ManejadorSesion.instance.sessionFactory.Evict(GetType(OficialImp))
Logger.Escribir("Evict entity")
oficialConcreto = ServidorDominio.Entidades.Oficiales.GetId(oficialConcreto.IdValue)

log:

[12:24:21:265][SELECT][SELECT [Codigo], Oficial, Dni, Funcion, Gestoria, Baja, DireccionAgenda, [CuentaAgenda], Notario, Color, NotarioAsociado FROM [Oficiales] ]
[12:24:21:281][INFO ][Evict entity]

Finally, the log end here

Thanks you.

Environment

None

Activity

Show:

Frédéric Delaporte October 22, 2017 at 4:24 PM

No test provided.

Fabio Maulo July 14, 2011 at 11:07 AM

I can't see where you are managing the NH's transaction.
The cache should work correctly with transactions.
Can you attach a failing tests ?

Ramón Miñarro February 9, 2011 at 10:25 AM

I tried session.evict(entity) and it need session.flush for evict entity really.

My flushmode is commit, for your information.

Thanks.

Incomplete

Details

Assignee

Reporter

Components

Affects versions

Priority

Who's Looking?

Open Who's Looking?
Created February 9, 2011 at 4:02 AM
Updated October 22, 2017 at 4:24 PM
Resolved October 22, 2017 at 4:24 PM
Who's Looking?