我是遇到了hibernate错误还是遇到了我没有看到的错误:selectenty.numberfromEntityAliasNameentywhereenty.myIdin(selectcons.myIdfromConsensconswherecons.numberin(selectord.numberfromOrdersordwhereord.customer=:customerandord.creationDate我得到的是以下内容:org.hibernate.util.StringHelper.root(StringHelper.java:257)Causedby:java.la
我有两个模型,Item和ShopSection。它们之间存在多对多关系。@Entity(name="item")publicclassItemextendsModel{@ManyToMany(cascade=CascadeType.PERSIST)publicSetsections;}@Entity(name="shop_section")publicclassShopSectionextendsModel{publicListfindActiveItems(intpage,intlength){returnItem.find("selectdistinctifromItemijoin
session.createQuery("SelectattributefromGoodsSectiontgs"+"joings.ascendantsagsjoinags.attributesattribute"+"whereattribute.outerId=:outerIdandtgs=:section").setString("outerId",pOuterId).setEntity("section",section).setMaxResults(1).uniqueResult();对我来说看起来不错,但结果是java.lang.IllegalStateException:No
session.createQuery("SelectattributefromGoodsSectiontgs"+"joings.ascendantsagsjoinags.attributesattribute"+"whereattribute.outerId=:outerIdandtgs=:section").setString("outerId",pOuterId).setEntity("section",section).setMaxResults(1).uniqueResult();对我来说看起来不错,但结果是java.lang.IllegalStateException:No