jjzjj

HqlSqlBaseWalker

全部标签

java - 这个 HQL 查询有什么问题?

我是遇到了hibernate错误还是遇到了我没有看到的错误:selectenty.numberfromEntityAliasNameentywhereenty.myIdin(selectcons.myIdfromConsensconswherecons.numberin(selectord.numberfromOrdersordwhereord.customer=:customerandord.creationDate我得到的是以下内容:org.hibernate.util.StringHelper.root(StringHelper.java:257)Causedby:java.la

java - org.hibernate.hql.ast.QuerySyntaxException : TABLE NAME is not mapped

我有两个模型,Item和ShopSection。它们之间存在多对多关系。@Entity(name="item")publicclassItemextendsModel{@ManyToMany(cascade=CascadeType.PERSIST)publicSetsections;}@Entity(name="shop_section")publicclassShopSectionextendsModel{publicListfindActiveItems(intpage,intlength){returnItem.find("selectdistinctifromItemijoin

java - 这个 HQL 有什么问题? "No data type for node"

session.createQuery("SelectattributefromGoodsSectiontgs"+"joings.ascendantsagsjoinags.attributesattribute"+"whereattribute.outerId=:outerIdandtgs=:section").setString("outerId",pOuterId).setEntity("section",section).setMaxResults(1).uniqueResult();对我来说看起来不错,但结果是java.lang.IllegalStateException:No

java - 这个 HQL 有什么问题? "No data type for node"

session.createQuery("SelectattributefromGoodsSectiontgs"+"joings.ascendantsagsjoinags.attributesattribute"+"whereattribute.outerId=:outerIdandtgs=:section").setString("outerId",pOuterId).setEntity("section",section).setMaxResults(1).uniqueResult();对我来说看起来不错,但结果是java.lang.IllegalStateException:No