English 中文(简体)
JPQL Join 采用回收方法
原标题:JPQL Join Query using getter method
  • 时间:2012-04-13 07:20:31
  •  标签:
  • jpql

SlectT pub from Publisher pub JOIN pub.magazines mag WHERE pub.revenue > 100 “

I m wondering if I can use method call instead of pub.revenue i.e pub.getRevenue(). Is this possible? Because the revenue variable may be declared private and cannot be accessed directly.

最佳回答

具有私人知名度的revenue变量并不限制在PQL查询中的使用。 无论知名度如何,你都可以使用。 因此,你的榜样应当发挥作用。

总的来说,你无法从联合调查组的询问中找到方法。 理由是,JPQL的查询将数据转换到QL的查询中,没有任何概念从JavakQ的电线上调用方法。

问题回答

暂无回答




相关问题
JPQL to SQL converter

Is it possible to access the SQL which is generated by JPQL? I would like to use the SQL to later create a view for my purposes. I am using Hibernate if it matters.

JPQL query SELECT optional + generic DAO select

I have followed a working JPA example to retrieve Category objects as such: return (ArrayList<Category>) getEntityManager().createQuery("from Category").getResultList(); The query is very ...

Using reserved JPQL keywords with JPA

I have an entity class called "Group" and NetBeans warns me "The entity table name is a reserved Java Persistence QL keyword". A similar case would be the use of reserved SQL keywords. Will this ...

Does an EJB-QL UPDATE statement defeat CMP

Does running an EJBQL UPDATE statement defeat the performance benefits of container managed persistance when compared to modifing the accessors on a managed entity? I m interested in this ...

Get Random Rows Using JPQL

Is it possible to use JPQL for getting random rows? For example in SQL Server I would use: select * from myTable where columnName = 4 order by newid() Thanks, Rod

translating outer join SQL query into EJB entity beans

I m new to EJB and trying to get my head around translating SQL concepts to EJB entity beans. Suppose I have two tables: PEOPLE (id, name), CONTACT(pid, phone_number). If I want to get a list of ...

热门标签