Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

request for some working examples step-by-step Master-Detail page using RESTful service

SmithJohn454 days ago — edited 4 days ago

hi all,

I am still struggling to find working example(s) for Master-Detail CRUD implementation using RESTful service.
kindly help with Link(s) or guide here, easy enough to understand by a beginner.

with kind regards

I tried like this searched on internet, need help for a better and recommended way to handle Master-Detail DML operations using RESTful API's.

https://forums.oracle.com/ords/apexds/post/apex-24-1-generate-data-and-deploy-master-detail-crud-using-8981#comment_65352832459507726261493821265796554246

== ===============================================================
== example to generate Master-Detail JSON format data for 2 tables:
== ===============================================================
SELECT 'application/json' as content_type, JSON_OBJECT (
        KEY 'department' VALUE (
          SELECT JSON_ARRAYAGG(
                   JSON_OBJECT (
                     KEY 'dname' VALUE d.DNAME,
                     KEY 'dept_no' VALUE d.DEPTNO,
                     KEY 'employees' VALUE (
                       SELECT JSON_ARRAYAGG (
                                JSON_OBJECT(
                                  KEY 'empno' VALUE e.EMPNO,
                                  KEY 'ename' VALUE e.ENAME
                                )
                              )
                       FROM   EMP e
                       WHERE  e.DEPTNO = d.DEPTNO
                     )
                   )
                 )
          FROM   DEPT d
          where d.DEPTNO in (10,20,30)
        )
      ) AS departments
FROM   dual;
== =================================
== Output of above PL/SQL statement:
== =================================
{
 "department": [
   {
     "dname": "ACCOUNTING",
     "dept_no": 10,
     "employees": [
       {
         "empno": 7839,
         "ename": "KING"
       },
       {
         "empno": 7782,
         "ename": "CLARK"
       },
       {
         "empno": 7934,
         "ename": "MILLER"
       }
     ]
   },
   {
     "dname": "RESEARCH",
     "dept_no": 20,
     "employees": [
       {
         "empno": 7566,
         "ename": "JONES"
       },
       {
         "empno": 7788,
         "ename": "SCOTT"
       },
       {
         "empno": 7902,
         "ename": "FORD"
       },
       {
         "empno": 7369,
         "ename": "SMITH"
       },
       {
         "empno": 7876,
         "ename": "ADAMS"
       }
     ]
   },
   {
     "dname": "SALES",
     "dept_no": 30,
     "employees": [
       {
         "empno": 7698,
         "ename": "BLAKE"
       },
       {
         "empno": 7499,
         "ename": "ALLEN"
       },
       {
         "empno": 7521,
         "ename": "WARD"
       },
       {
         "empno": 7654,
         "ename": "MARTIN"
       },
       {
         "empno": 7844,
         "ename": "TURNER"
       },
       {
         "empno": 7900,
         "ename": "JAMES"
       }
     ]
   }
 ]
}  

Comments

Ana Taboada-Oracle
Answer

Creo que ya lo he conseguido,

He ejecutado los siguientes comandos desde la base de datos de la que soy administradora:

ALTER USER account ACCOUNT UNLOCK;
ALTER USER user_name IDENTIFIED BY new_password; 

Y después he he restablecido la nueva contraseña, seleccionando “restablecer Contraseña”

Espero que os sirva si tenéis el mismo problema que yo.

Gracias.

Marked as Answer by Ana Taboada-Oracle · Dec 5 2024
1 - 1

Post Details

Added 4 days ago
0 comments
32 views