I have a package that will be inserting a single parent record in one table, and dependent child records in another table with a FK on the parent_id. Each of these functions will be called by an external program, and all calls to insert children may not be contained within the same transaction.
I'm wondering if there is any way for me to avoid having to track the parent_id manually and pass it along in every procedure's parameter list. I've considered using the sys_context, but don't think that will work because it won't be in a single transaction.
Are there any other strategies for this or do I just need to suck it up and pass the parent_id to every method?