getEntityA() { } this.a = a;当我查询以下内容时String hql = "from EntityB eb where eb.entityA is null";
当我尝试用它来查询时,它不起作用。String hql = "from EntityA ea where ea.entityB is null";
我需要更新表a中的多个行,似乎可以通过使用for循环和进行合并来使用面向对象的方法。这种方法还使我能够更新其他表(作为MyEntity的其他属性)。在这里发布的一个问题上,使用namedQuery更新的第二个选项似乎更快。但是,如果我还需要批量更新多个表,该如何实现更新?+ "WHERE a.site.id=:siteId and a.agentTree like :agentTree")})org.hibernate.hql.ast.Quer
我正在尝试用grails为下面的域编写一个条件查询: Long createdById // this is user id}它与用户没有直接关系,但有一个字段createdById,它是用户的id。
(我不能在数据中直接引用用户,因为它们属于不同的项目,其中数据来自自定义的可重用插件。)现在,我希望为数据编写标准,并列出由给定公司的用户创建的所有记录。这就是data.id