Hi,

1. OK, so you used "magic" conventions... :-)
2. Good you liked it! ;-)
3. Yes, that is true... might be an improvement for the future.
4. Agreed. Changed it to only target IStatelessSession, I think it makes 
more sense.

RP

On Wednesday, October 29, 2014 9:31:35 AM UTC, Gunnar Liljas wrote:
>
> Hi!
>
> I forgot to say that I think that it is a very good start!
>
> 1. Since there are quite a few limitations to the bulk insert, I've needed 
> to allow unmapped classes through my bulk inserter. One scenario is adding 
> rows to a ManyToMany table, another is is joined components. For these 
> cases the convention is that the table name is specified and the column 
> names are the property names.
> 2. NH-3606 would be a good thing
> 3. By using an intermediate table and the OUTPUT clause in the following 
> INSERT
> 4. Alexander's suggestion to only allow this on IStatelessSession makes 
> sense.
>
> /G
>
> 2014-10-29 8:55 GMT+01:00 Ricardo Peres <[email protected] <javascript:>>:
>
>> Hi, Gunnar!
>>
>> Thank you so much for your feedback! Will try to address your questions.
>>
>> 1. What do you mean with only mapped classes? How would we know the table 
>> and columns for unmapped classes? Or are you talking about the class 
>> template restriction? If so, that is kind of an unofficial requirement for 
>> NHibernate, since structs cannot be subclassed.
>> 2. Maybe you are right. In this case, I will have to spawn a new 
>> stateless session from the current session (if it is currently not one), 
>> which may have to wait for my pull request for NH-3606 to be merged. Or 
>> manually generate INSERTs, which I wouldn't like. Another option is to not 
>> have a default, that is, in cases where it is not supported, return null 
>> from DriverBase, which will result in an exception.
>> 3. Yes it is, but for a single record: SCOPE_IDENTITY only returns the 
>> last IDENTITY inserted. Or are talking something else?
>> 4. You mean, check if each entity is in the session cache? This will 
>> likely slow things a bit. Also, the BulkInsert method does not add the 
>> entities to this cache - unless, of course, in DefaultBulkProvidet, when it 
>> uses ISession.Save - so they will never be flushed.
>>
>> I understand what you mean about making bulk a feature, but this requires 
>> substantial architectural changes, which were outside the scope of what I 
>> wanted. Maybe something to consider, if there is the will for that.
>> @hazzik also gave some feedback on the code, I will do some changes.
>>
>> Again, thanks!
>>
>> RP
>>
>> --
>>
>> ---
>> You received this message because you are subscribed to the Google Groups 
>> "nhibernate-development" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] 
>> <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"nhibernate-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to