开发者

Simple jpa question

I have to go through some code of a project to implement some missiong functionality. It uses jpa.In some popj classe开发者_StackOverflow中文版s i have found

@Entity
@Table(name="TYPE")
@NamedQueries( { 
 @NamedQuery(name = "getTypes", query = "SELECT dct FROM Type dct") 
})

I know that i can used to get all records by using this query.Does this query return all records in type table?


This query will return all the Type entities including subtypes, if any. And since I can't say if this there are any subtypes, I can't say if this query will be restricted to the TYPE table.


Yes, it does. It generates an SQL query that looks roughly like this:

SELECT [column list here] FROM type
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜