0

I have the two following custom object

public class customDataObject_1 {
    private String number;
    private List<PartnerData> partnersDatas;
    private List<customDataObject_2> custom_list_2;
}
and 
public class customDataObject_2 {
    private String property1;
    private String property2;
    private String property3;
    private DataObject1 dataObject1;
    private DataObject2 dataObject2;
    private DataObject3 dataObject3;
}

In JPQL, I can get the following list of object Array: List by a query that is alike

String queryString = select orderNo, new package1.PartnerData(-), new package2.customDataObject_2(-,-,-,-,-,-) from -,-,-,- where ------;

After a java treatment I can get from the result of the request the following result: List#customDataObject_1#.

My question is: is it possible to get, without a java treatment, directly from a JPQL request the previous result, that is List#customDataObject_1# and if it is possible, how

1 Answer 1

1

No you can't.

The result of a SQL query is always a table. So cannot get nested tables inside the result.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.