I have something like this..
Code:
class Child extends Parent{
private String applicationId; // which is a FK to transactionId
}
class Parent {
private String transactionId;
}
so do I need to make an instance of the Parent class within the Child class?
Is there any other way of doing it without changing the structure of the class, lets say defining annotations on one of the fields?..
Also please note that the Child extends the Parent class.
I also have a case wherein..
Code:
class Child extends Child2 {
}
class Child2 {
private Parent parent;
}
class Parent {
}
I need to query within Child and parent. Will i get the parent attribute instantly from Child through child2?
Thanks for the help.. very much appreciated.