• Post Reply Bookmark Topic Watch Topic
  • New Topic

Advanced hql

 
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).
 
You can't expect to wield supreme executive power just because
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!