Flominator,A collection that large shouldn't be a collection On Tue, Apr 21, 2009 at 10:42 AM, Flominator <[email protected]> wrote:
> > Hi there, > > I use AR to store measurands which are in channels which are in a > measurement: > > > Part of Measurement.cs: > [HasMany(typeof(Channel), Table = "Channels", ColumnKey = > "measurementid", Lazy=true, Cascade = > ManyRelationCascadeEnum.AllDeleteOrphan)] > private IList<Channel> Channels > > > Part of Channel.cs: > [HasMany(typeof(Measurand), Table = "Measurand", ColumnKey = > "channelid", Index="Datee", Lazy=true, Cascade = > ManyRelationCascadeEnum.AllDeleteOrphan)] > private IDictionary<DateTime, Measurand> Measurands > > Measurands are simple value objects with value and date. > > > When loading a measurement from a big set of Excel files we have one > measurement with 33 channels and 18 million (sic!) measurands. That > makes about 600000 measurands per channel. > > Measurands are saved when they're added to the channel. I use one > transaction to import 33 measurands per loop. > > My problem is, that adding the measurands to the channel causes the > beginning and end date property of the measurement to change. This > means I have to save the measurement in the end in order to not lose > my dates. > > When I try to do this after some hours of importing I get this > exception: > http://groups.google.com/group/castle-project-users/web/OutOfMemory.PNG > > It seems to me that AR tries to initialize a List<Measurand> with > about 600000 entries which causes an out-of- memory exception. > > I only want to save the measurement, not the children. The children > haven't changed, so there is no need to do it. > Is there any way to "tell" this to AR or NHibernate? > > Thanks in advance, > > Flo > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Castle Project Users" 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/castle-project-users?hl=en -~----------~----~----~----~------~----~------~--~---
