Skip to Main Content

ORDS, SODA & JSON in the Database

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!

Disable hyperlink generation in AutoREST feature

LeandroideFeb 19 2020 — edited Feb 26 2020

Hi guys, we were wondering if there is some workaround to disable hyperlinks generation in AutoRest Enabled objects?

Maybe you are wondering WHY, just because we are consuming ORDS endpoints through Java applications, so we cannot map the response to our DAO, DTOs, etc, considering that responses come like this:

{

     "items" : [

               { "my_db_field" : "MyDB Value" },

               { "my_db_field" : "MyDB Value" },

               { "my_db_field" : "MyDB Value" },

               ...

     ],

     "links" : [

               {

                    "rel" : "self",

                    "href" : "URL"

               },

               {

                    "rel" : "edit",

                    "href" : "URL"

               },

                   ...

     ]

The bold part of the JSON response is what does not belong to our data model, causing most Java frameworks to fail mapping resources.

Thanks in advance, and have a nice day!

Comments

Gary Graham-Oracle

I have not tested specifically on Linux, but it should behave the same as on Windows.  Basically...

0.  You must have a Java 8 JRE (public, standalone) or JDK installed.

1.  If PATH environment variable points to an Oracle client, SQLcl should automatically connect with OCI/Thick driver

2.  If not, then SQLcl connects with Thin driver.

Once connected, you can verify the connection type by running...

show connection

which will display something like...

CONNECTION

HR@jdbc:oracle:oci8:@ADC122PB

or...

CONNECTION:

HR@jdbc:oracle:thin:@(DESCRIPTION =    (ADDRESS_LIST =      (ADDRESS = (PROTOCOL = TCP)(HOST = myhost.mycompany.com)(PORT = 1521))    )    (CONNECT_DATA =

   (SERVICE_NAME = orcl.mycompany.com)    )  )

If it does not work on Linux as I describe above, then you can try passing the -oci flag when invoking SQLcl.

1 - 1

Post Details

Added on Feb 19 2020
9 comments
645 views