Home  >  Q&A  >  body text

java - How to use HQL to filter out entities with collection attributes

For example, the entity User contains the nicknames attribute of Set<String>.
There are n User objects, and one of the User's nicknames collection contains "admin".
How to write HQL to return the User entity whose nicknames collection contains "admin"?

曾经蜡笔没有小新曾经蜡笔没有小新2602 days ago736

reply all(1)I'll reply

  • 仅有的幸福

    仅有的幸福2017-05-17 10:09:08

    • Join

    • Member of

    reply
    0
  • Cancelreply