W
warth33
Hi
Maybe I am at the wrong place? Its a question about hibernate. Can you
redirect me in that case?
Im a real newbie with hibernate.
Suppose you have the class Person
String givenname;
String lastname;
public void setGivenname(String str){givenname = str;}
public void setLastname(String str){lastname = str;}
public String getLastname(){return lastname;}
public String getGivenname(){return givenname;}
And you have some .hbm file that contains things like:
<property name="givenname" />
<property name="lastname" />
Right? it works more or less in this way?
Fine. Now, if I want the class Person be able to return completeName,
how can I accomplish this?
completeName is givenname + lastname.
Do I create a method inside Person the sets gets completeName? Do I
also need to modify .hbm file? Thank you very much in advance for
those that can help me.
Maybe I am at the wrong place? Its a question about hibernate. Can you
redirect me in that case?
Im a real newbie with hibernate.
Suppose you have the class Person
String givenname;
String lastname;
public void setGivenname(String str){givenname = str;}
public void setLastname(String str){lastname = str;}
public String getLastname(){return lastname;}
public String getGivenname(){return givenname;}
And you have some .hbm file that contains things like:
<property name="givenname" />
<property name="lastname" />
Right? it works more or less in this way?
Fine. Now, if I want the class Person be able to return completeName,
how can I accomplish this?
completeName is givenname + lastname.
Do I create a method inside Person the sets gets completeName? Do I
also need to modify .hbm file? Thank you very much in advance for
those that can help me.