Ouch just saw that it had been discussed just 2 threads below:
http://groups.google.se/group/nhusers/browse_thread/thread/d9e16b36eb93a6ce#

Sorry :|

On 12 Maj, 13:06, Niclas Pehrsson <[email protected]> wrote:
> Hi I have a question about collections and insert optimizations.
>
> In my case I have a an entity Receipt, and it has one to many
> receiptrows.
>
> NH Profiler gives me this information about which sql queries being
> executed:
>
> INSERT INTO Receipt
>            (Id)
> VALUES     ('887c9d7c-5030-4058-840f-57f1f681a732' /* @p0 */)
>
> INSERT INTO ReceiptEntry
>            (Id)
> VALUES     ('f4c3c8a7-924b-4364-8a8c-64fa366e8847' /* @p0 */)
>
> UPDATE ReceiptEntry
> SET    ReceiptId = '887c9d7c-5030-4058-840f-57f1f681a732' /* @p0 */
> WHERE  Id = 'f4c3c8a7-924b-4364-8a8c-64fa366e8847' /* @p1 */
>
> My problem is I don't want he Update query, I want it to be merged
> with the Insert of ReceiptEntry, how can I manage that.
>
> Here are my mappings in Receipt, ReceiptEntry does not know about its
> owner.
>
>     <set name="Entries" access="field.camelcase-underscore"
> inverse="false" cascade="all">
>       <key column="ReceiptId" foreign-key="FK_ReceiptEntry_Receipt" on-
> delete="cascade"/>
>       <one-to-many class="CashRegister.ReceiptEntry, CashRegister"/>
>     </set>
>
> Can I solve this?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" 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/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to