Null list returned from hibernate query with embedded id

前端 未结 4 1241
独厮守ぢ
独厮守ぢ 2020-12-31 12:52

I have an entity with an embedded key. The entity has only the key as a field and the key has 7 fields, some of which can be null.

When I run the following query:

4条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2020-12-31 13:28

    You are facing issue because you have included columns which may have null value. Do no include nullable columns in composite key. By RDBMS definition a key must be not null. Rethink the columns which can uniquely identify each row and make them part of your composite key.

提交回复
热议问题