Skip to content

Add support for custom BulkIdStrategy #2004

Open
@sebastieno

Description

@sebastieno

Hello all,

I have this kind of code :

this.session.Query<EventEntity>()
     .Where(e => [...])
     .Update(c => new { Enabled = true });

which generate the following SQL :

insert into HT_event SELECT evententit0_.Id as Id FROM event evententit0_ WHERE [...]
UPDATE event SET Enabled=? WHERE (Id) IN (select Id from HT_event)

My EventEntity is a base class (I have inheritance using table per class hierarchy inheritance mapping with mapping by code). I just tried to update a field on the base class, according to a simple where clause and I want to avoid the creation of a temp table.

I found that Hibernate offer a way to modify the BulkIdStrategy to use an inline clause for example : http://in.relation.to/2017/02/01/non-temporary-table-bulk-id-strategies/

When do you plan to add this feature to NHibernate ? Thanks a lot for your help.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions