Md Sadique Inam
08/09/2024, 12:42 PMLuis Arcos
08/09/2024, 1:54 PMMd Sadique Inam
08/09/2024, 2:38 PMUserEntity.find { or exists(Emails.select(Emails.id).where { (Emails.email eq uid) and (Emails.userId eq Users.id) }) }
.firstOrNull()
Emails.userId eq Users.id
eq
gives this error
Type argument for a type parameter V can't be inferred because it has incompatible upper bounds: UUID, Comparable<UUID>, EntityID<UUID> (multiple incompatible classes: UUID, EntityID<UUID>)
Luis Arcos
08/09/2024, 2:41 PM(Emails.email eq uid)
this statement doesn't look right to meMd Sadique Inam
08/09/2024, 2:41 PMLuis Arcos
08/09/2024, 2:42 PMMd Sadique Inam
08/09/2024, 2:42 PMMd Sadique Inam
08/09/2024, 2:43 PMLuis Arcos
08/09/2024, 2:45 PMMd Sadique Inam
08/09/2024, 2:52 PMobject Users : UUIDTable() {
val name = varchar("name", length = 250)
val username = varchar("username", length = 250).uniqueIndex()
val password = varchar("password", length = 250)
val createdAt = datetime("created_at")
val updatedAt = datetime("updated_at").nullable()
}
Md Sadique Inam
08/09/2024, 2:52 PMobject Emails : UUIDTable() {
val email = varchar("email", 255).uniqueIndex()
val userId = reference("user_id", Users)
val isPrimary = bool("is_primary")
val createdAt = datetime("created_at")
val updatedAt = datetime("updated_at").nullable()
}
Luis Arcos
08/09/2024, 2:56 PMval userId = reference("user_id", Users)
be val userId = reference("id", Users)
?Chantal Loncle
08/09/2024, 3:11 PMeq
but the code still compiles and runs without exception? If so, this is a bug and a fix for it has already been merged, which will be available with the next end-of-month release when we update the Kotlin version.
The quick test I ran using your example tables does compile and run despite the error showing, but if you want to get rid of the IDE highlighting error, enabling K2 mode does that.Md Sadique Inam
08/09/2024, 6:01 PM