- Try to execute query: `select f from exp_Room r join r.files f where r.roomId = :roomId`
Actual behavior
Exception occurs:
Exception Description: Problem compiling [select tempEntityAlias from exm_File tempEntityAlias, exm_Room r join r.files f where (r.roomId = :roomId) and (tempEntityAlias.id = f.id)].
[124, 142] The state field path ‘tempEntityAlias.id’ cannot be resolved to a valid type.
[145, 149] The state field path ‘f.id’ cannot be resolved to a valid type.
https://www.cuba-platform.ru/discuss/t/oshibka-sostavleniya-jpql/5605
Environment
Description of the bug or enhancement
Minimal reproducible example
@Id @Column(name = "FILE_ID", nullable = false) var fileId: String? = null
...
override fun getId() = fileId
override fun setId(id: String?) { fileId = id } }
@Table(name = "ROOM_TABLE") @Entity(name = "exm_Room") open class Room : BaseStringIdEntity() {
@Id @Column(name = "ROOM_ID", nullable = false) var roomId: String? = null
@JoinTable( name = "ROOM_FILE_TABLE", joinColumns = [JoinColumn(name = "ROOM_ID")], inverseJoinColumns = [JoinColumn(name = "FILE_ID")] ) @ManyToMany var files: MutableList? = mutableListOf()
override fun getId() = roomId
override fun setId(id: String?) { roomId = id } }