Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support non-id primary keys #116

Open
jamesremuscat opened this issue Mar 31, 2024 · 1 comment
Open

Support non-id primary keys #116

jamesremuscat opened this issue Mar 31, 2024 · 1 comment

Comments

@jamesremuscat
Copy link

It looks like Admiral is hard-coded to expect an id attribute to be the primary key for data.


pathname={`${config.path}/${record.id}`}

id={record.id}

This is an issue if using an API with a different name for the primary key! (For example, I'm trying to work with objects that have sessionID as their primary key.)

It would be useful to be able to specify this as part of a CRUD definition.

@mr-bantsevich
Copy link
Contributor

Thanks for your interest and your question!

We have built the application architecture in such a way that circles and queries sent within them are built based on the passed ´path´ and ´id´.
Queries to retrieve table data must return a string ´id´ in the data structure. This ´id´ is used for further logic, e.g. for actions in the table.

At the moment we have this architecture and it will be quite expensive to change it. We have to make changes in a large part of the application.
But if there are desires to be a contributor, you are welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants