I have parent table and child table, with 1 to 0..N mapping, i.e. one parent record can have 0 or many child records.
Query:
select parent_Table.* , cursor (select * from child_Table child where child.id = parent.id) child_data
from parent_Table parent
On the Java side, i am using rowMapper to convert this into POJO of parent and child classes. But here I may get following error, if the number of parent record for which child record exists, exceeds number of allowed open cursors with Oracle.
ORA-01000: maximum open cursors exceeded
Is there any alternative to above approach ?