I don't know if cache is the right terminology, but it is the best I could think of.
I am adding an object to a conversation by calling SessionFactory.GetCurrentSession().Save (which works), but later I need to retrieve that object but I do not know the id however I do know certain attributes of the object. So I created an ICriteria to look for those particular attributes, which works on its own for persisted objects. Now my problem is that when I have added the object to the cache but have not flushed it and I later call the attribute search function it never finds the object so it tries to create it again and then it crashes because it is already there. So the Save call sees the previously created entity as part of the conversation even if it has not been persisted to the DB however the CreateCriteria does not....this is not how I understood it to work, could someone please clarify? Thanks, Josh --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhusers@googlegroups.com To unsubscribe from this group, send email to nhusers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---