I need to create some thousand of records. For each record I have selected a payerCompanyID and recipientCompanyId fields with HQL query (aggregation, summing, ant stuff).
Is it possible somehow to insert into database a new Bill record without fetching Company from database? Now i have this: newBill.RecipientCompany = ActiveRecordMediator<Company>.FindByPrimaryKey (record.RecipientCompanyId); newBill.PayerCompany = ActiveRecordMediator<Company>.FindByPrimaryKey (record.PayerCompanyId); ActiveRecordMediator.Save(newBill) Instead, i would like to have this: newBill.RecipientCompany.Id = record.RecipientCompanyId; newBill.PayerCompany.Id = record.PayerCompanyId; ActiveRecordMediator.Save(newBill) Is it somehow possible? It should be, because if i load a bill, then both Company fields are not loaded, but the Id can be accessed. So both companies are unitialized proxies. Maybe something liek this would work: newBill.RecipientCompany.Id = NHUtils.MakeUnitializedProxy<Company> (record.RecipientCompanyId); newBill.PayerCompany.Id = NHUtils.MakeUnitializedProxy<Company> (record.PayerCompanyId); ActiveRecordMediator.Save(newBill) Thank you for any ideas --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
