merge

open fun <E : Any> merge(entity: E, mode: SaveMode = SaveMode.UPSERT): KSimpleSaveResult<E>

Unlike save, merge is significantly different, only the insert and update operations will be executed, dissociation operations will never be executed.

Note: The 'merge' of 'Jimmer' and the 'merge' of 'JPA' are completely different concepts!

Return

The save result

Parameters

entity

The entity object to be merged

mode

The save mode for root object.

The type of the entity

open fun <E : Any> merge(input: Input<E>, mode: SaveMode = SaveMode.UPSERT): KSimpleSaveResult<E>

Unlike save, merge is significantly different, only the insert and update operations will be executed, dissociation operations will never be executed.

Note: The 'merge' of 'Jimmer' and the 'merge' of 'JPA' are completely different concepts!

Return

The save result

Parameters

input

The Input object to be merged

mode

The save mode for root object.

The type of the entity

open fun <E : Any> merge(entity: E, block: KSaveCommandDsl.() -> Unit): KSimpleSaveResult<E>

Unlike save, merge is significantly different, only the insert and update operations will be executed, dissociation operations will never be executed.

Note: The 'merge' of 'Jimmer' and the 'merge' of 'JPA' are completely different concepts!

Return

The save result

Parameters

entity

The entity object to be merged

block

The lambda expression for other configurations

The type of the entity

open fun <E : Any> merge(input: Input<E>, block: KSaveCommandDsl.() -> Unit): KSimpleSaveResult<E>

Unlike save, merge is significantly different, only the insert and update operations will be executed, dissociation operations will never be executed.

Note: The 'merge' of 'Jimmer' and the 'merge' of 'JPA' are completely different concepts!

Return

The save result

Parameters

input

The Input object to be merged

block

The lambda expression for other configurations

The type of the entity