sql - Why does Hibernate JPA lose the column names when queried? -
when query hibernate a:
"select business relationship a", jaxrs gives me column names in json, when execute query:
"select a.firstname, a.lastname business relationship a" json contains info without column names.
for instance:
{ firstname: "simon" }
becomes:
{ "simon" }
select business relationship
is jpql query returns list<account>
. list serialized json array of objects.
on other hand,
select a.firstname, a.lastname business relationship
is jpql query returns list<object[]>
. list serialized json array of arrays.
and finally,
select a.firstname business relationship
is jpql query returns list<string>
. list serialized json array of strings.
sql hibernate jpa orm
No comments:
Post a Comment