Have you checked if this issue already exists?
Molgenis EMX2 version
Software version: 13.171.0. Database version: 33.
Description
When I try to delete records from an inherited table with the pyclient, the records are deleted in the subtable, but not in the parent table. When I try to do the same thing with the UI functionality, the record is deleted from both the parent and the sub table.
Reproduction steps
- Go to 'https://emx2.dev.molgenis.org'
- Create a new empty schema called
pet store delete issue with the profile pet store and include demo data.
- Upload the following archive. This adds a table
Small pets to the pet store, this table extends Category. The Small pets table includes two rows: Cats (small) and Dogs (small). These records are also present in the parent table Category.
pet store delete issue1785229295558.zip
- Create a new script with the following code:
from molgenis_emx2_pyclient import Client
import pandas as pd
import os
MOLGENIS_TOKEN = os.environ['MOLGENIS_TOKEN']
client = Client(url='http://localhost:8080', token=MOLGENIS_TOKEN)
small_pets = client.get(table='Small pets', as_df=True, schema='pet store delete issue')
client.delete_records(schema='pet store', table='Small pets', data=small_pets)
print(f"Deleted {list(small_pets['name'])}")
- Run the script
- See that the entries are deleted from the
Small pets table but not the Category table.
Expected behaviour
I expected the entries to be deleted from both the inherited table, as well as the parent table, as it does when using the UI functionality.
System configuration
- Device:
- Operating system:
- Browser:
Have you checked if this issue already exists?
Molgenis EMX2 version
Software version: 13.171.0. Database version: 33.
Description
When I try to delete records from an inherited table with the pyclient, the records are deleted in the subtable, but not in the parent table. When I try to do the same thing with the UI functionality, the record is deleted from both the parent and the sub table.
Reproduction steps
pet store delete issuewith the profilepet storeand include demo data.Small petsto the pet store, this table extendsCategory. TheSmall petstable includes two rows:Cats (small)andDogs (small). These records are also present in the parent tableCategory.pet store delete issue1785229295558.zip
Small petstable but not theCategorytable.Expected behaviour
I expected the entries to be deleted from both the inherited table, as well as the parent table, as it does when using the UI functionality.
System configuration