akp
akp

Reputation: 1893

Simple jpa question

I have to go through some code of a project to implement some missiong functionality. It uses jpa.In some popj classes 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?

Upvotes: 0

Views: 105

Answers (2)

Pascal Thivent
Pascal Thivent

Reputation: 570385

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.

Upvotes: 1

Bozho
Bozho

Reputation: 597134

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

SELECT [column list here] FROM type

Upvotes: 1

Related Questions