Thank both of you, wrapping the whole thing in repository do ... end
indeed does the job. Balint On Dec 27, 8:16 pm, "Dan Kubb (dkubb)" <[email protected]> wrote: > Hi Balint, > > > If my interpretation is correct, (1) above violates the Identity Map > > feature of DataMapper (it should be true) but I might be missing a > > point. Could anyone shed a light on whether this is a bug or a > > feature? > > Wrap the code in a repository block and it should use the Identity > Map. > > The IM is only in scope inside the repo blocks because otherwise in > long running processes Ruby wouldn't garbage collect between lookups, > slowing leaking memory until all available memory is consumed. If MRI > *and* JRuby had decent WeakHash implementations we could make it so > the IM is available outside repository blocks, but based on feedback > I've received there aren't any stable enough for us to use. > > Dan > (dkubb) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "DataMapper" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/datamapper?hl=en -~----------~----~----~----~------~----~------~--~---
