Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 9169

Foreign Keys in HDBDD files

$
0
0

Hi,

 

I am trying to create a data model using HDBDD. I am trying to incorporate foreign keys where the referencing table should not allow an entry if the foreign key is not present in the referenced table.

 

@Schema : 'TEST

context STATUS_ENTRIES

{

     @Catalog.tableType : #COLUMN

      entity status

     {

           key status_id : Integer;

           description: String(10);

      } ;

      entity ref_status

      {

            key  ref_status_id: Association [1,1] to status{status_id};

            description: String(10);    

     };

};

 

So what i am trying to do here is to create a table named status which has the main status entries with key field as status_id and another table whose key ref_status_id is referencing status_id from status table. However when i insert ref_status id's in the "ref_status" table that are not present as status_id's in "status" table, it lets the query run successfully. Can someone let me know what i'm doing wrong?

 

Thanks,

Timothy


Viewing all articles
Browse latest Browse all 9169

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>