Hello again,
only for testing i changed the Nhibernate ActionQueue code;
it seems works. (but i'm still waiting for another legal ways. :)))) I mailed this only for sharing )
private void ExecuteActions(IList list)
{
//this prevents throwing exception if collection changes.
int actionCount = list.Count;
for (int i = 0; i < actionCount; i++)
{
Execute(list[i] as IExecutable);
}
//if something added by the event listeners. this code execute additions
int newActions = list.Count;
for (int i = actionCount; i < newActions; i++)
{
Execute(list[i] as IExecutable);
}
list.Clear();
session.Batcher.ExecuteBatch();
}
it is works on insert operations but insert operations are first executed. (we have to make history for update,delete also)
so i've changed,
/// <summary>
/// Perform all currently queued actions.
/// </summary>
public void ExecuteActions()
{
ExecuteActions(insertions);
ExecuteActions(updates);
ExecuteActions(collectionRemovals);
ExecuteActions(collectionUpdates);
ExecuteActions(collectionCreations);
ExecuteActions(deletions);
//if something added after insert the executions.
ExecuteActions(insertions);
}
--
Fethi Gürcan