If I define a parametername for my resource like here:
It seems that the orm baseHandler always expects it to be named id:
Looks like a bug to me?
If I define a parametername for my resource like here:
It seems that the orm baseHandler always expects it to be named id:
Looks like a bug to me?
Well, the resource base handler goes on convention. If you change the conventions, then you have to do updates to tell the base that you have changed the conventions.
So either,
A) you override the base with your own conventions
B) We update the orm base to have a way to change the conventions via variables
like:
variables.idName = "id"
C) Create an action where you param it
function show( event, rc, prc ){
rc.id = rc.userId ?: 0;
super.show( argumentCollection=arguments )
}
Currently I took an approach like you suggested in option c.
I think it would be more consistent to have option B, I could prepare a pull request if you are fine with it?
Thanks for all the feedback @gunnar.lieb . This approach is still quite new and I am sure we can expand it.
I would say yes. There is already some variables to define sort order and entity names:
So we can follow consistency there and add more variables with different defaults.