• Post Reply Bookmark Topic Watch Topic
  • New Topic

Advanced hql  RSS feed

 
paulo fe
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello every body!!!
i have a object Person :
public class Person {
private String name;
private Adress add;
}
and i have the clause select p.add from Person as p
but this query return the object Adress and i want
that query return the Person object with a Adress and name
with the default value (null or some else..)..
heelllp!!!
 
Peter Laurinec
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Query: "from Person p" will return all persistent objects from the database.
Then you can normally refer to Person attributes(name,add).
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!