JetBrains / Exposed

Kotlin SQL Framework
http://jetbrains.github.io/Exposed/
Apache License 2.0
8.05k stars 674 forks source link

Change in behavior of `inList` ("inListIds" variant) #2069

Closed jeremyluinstra-RL closed 2 months ago

jeremyluinstra-RL commented 2 months ago

A recent change was made to the signature of this inList function from

infix fun <T : Comparable<T>, ID : EntityID<T>?> Column<ID>.inList(list: Iterable<T>)

to

infix fun <T : Comparable<T>> Column<EntityID<T>?>.inList(list: Iterable<T>)

This is breaking and I'm not sure I see the point of it. Now to select from an IdTable you have to convert your list of ids to EntityID, whereas before this was not necessary. This change will break a lot of code.

Example of code that is no longer valid

val table = UUIDTable("test_table")
val uuidList = listOf<UUID>()
table.selectAll().where { table.id inList uuidList }
bog-walk commented 1 month ago

@jeremyluinstra-RL An update in case you missed it:

Version 0.50.1 is available with the fix for this issue included.