Sorry for a badly framed title question.
But basically if I have two classes , Employee and Address. Employee has reference to an instance of Address.
Class Employee{
@Id
Integer id;
@Column(name="Name")
private String name;
@Column(name="Address")
private Id addressId;
@ManyToOne(name="Address", referencedColumnName="ID", insertable=false, updatable=false)
private Address address;
}
now using spring-hibernate,
when I execute something like "Select * from Employee" , it will fetch me not only each employee record but also the corresponding contained Address record.
Thats how hibernate does it . I don't only get the address Id but a whole data of address in each object of employee.
So I can do something like employee.getAddress().getName()
but the thing is due to some weird client requirement, we're forced to only use procedures in our code to access data and procedures in turn will call queries . So no direct query in our code. but with procedures we won't be able to take advantage of this feature of spring-hibernate.
Is it possible that a procedure can do the same (return whole data of each employee in each employee object)??