You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have 2 entities: User and Follow, which is manual many-to-many relationship table. Both tables are identified by AdminBro and there are pages for them in navigation panel. But when I try to navigate to Follow page, it request fails with 500 error.
My debugging got me to find request failing in Core AdminBro package due to sortBy being undefined, because it could not find any property, by which is could sort.
Further digging got me to Property.isSortable() which apparently return false, even if my column is just a string or number. Which in turn, I think happens because typeorm marks my 2 primary columns as reference columns and admin-bro-typeorm` does not like that.
Error: undefined column was not found in the Follow entity.
at /home/m-nny/projects/junkyard/improved-spoon/src/find-options/FindOptionsUtils.ts:122:27
at Array.forEach (<anonymous>)
at Function.FindOptionsUtils.applyOptionsToQueryBuilder (/home/m-nny/projects/junkyard/improved-spoon/src/find-options/FindOptionsUtils.ts:118:40)
at Function.FindOptionsUtils.applyFindManyOptionsOrConditionsToQueryBuilder (/home/m-nny/projects/junkyard/improved-spoon/src/find-options/FindOptionsUtils.ts:71:25)
at EntityManager.<anonymous> (/home/m-nny/projects/junkyard/improved-spoon/src/entity-manager/EntityManager.ts:678:33)
at step (/home/m-nny/projects/junkyard/improved-spoon/node_modules/tslib/tslib.js:143:27)
at Object.next (/home/m-nny/projects/junkyard/improved-spoon/node_modules/tslib/tslib.js:124:57)
at /home/m-nny/projects/junkyard/improved-spoon/node_modules/tslib/tslib.js:117:75
at new Promise (<anonymous>)
at Object.__awaiter (/home/m-nny/projects/junkyard/improved-spoon/node_modules/tslib/tslib.js:113:16)
Here are my entities. Also I created minimal repo (here)[https://github.com/m-nny/improved-spoon]
I have 2 entities:
User
andFollow
, which is manual many-to-many relationship table. Both tables are identified by AdminBro and there are pages for them in navigation panel. But when I try to navigate toFollow
page, it request fails with 500 error.My debugging got me to find request failing in Core AdminBro package due to
sortBy
being undefined, because it could not find any property, by which is could sort.Further digging got me to
Property.isSortable()
which apparently returnfalse
, even if my column is just a string or number. Which in turn, I think happens because typeorm marks my 2 primary columns as reference columns and admin-bro-typeorm` does not like that.Is there any way of forcing adapter to sort by specified column or any other fix?
https://github.com/SoftwareBrothers/admin-bro-typeorm/blob/7ff78547db5eb0c8344692c92577a973593437d7/src/Property.ts#L28
Here are my entities. Also I created minimal repo (here)[https://github.com/m-nny/improved-spoon]
The text was updated successfully, but these errors were encountered: