fastcrud icon indicating copy to clipboard operation
fastcrud copied to clipboard

Add sorting for nested list structures

Open bantoinese83 opened this issue 1 year ago • 1 comments

Add sorting functionality for nested items in one-to-many and many-to-many relationships.

  • Add sort_columns and sort_orders attributes to JoinConfig class in fastcrud/crud/helper.py.
  • Validate sort_columns and sort_orders in JoinConfig class.
  • Update _prepare_and_apply_joins method in fastcrud/crud/fast_crud.py to handle sorting of nested items.
  • Add test cases for sorting nested items in one-to-many and many-to-many relationships in tests/sqlalchemy/crud/test_get_multi_joined.py.
  • Add test cases for sorting nested items in one-to-many and many-to-many relationships in tests/sqlmodel/crud/test_get_multi_joined.py.

For more details, open the Copilot Workspace session.

bantoinese83 avatar Jan 13 '25 05:01 bantoinese83

@bantoinese83 can you please fix the checks?

igorbenav avatar Mar 20 '25 04:03 igorbenav