ERROR [ExceptionsHandler] Error: Invalid column name 'children'.
QueryFailedError: Error: Invalid column name 'children'.
at <anonymous> (/home/nemesis/dev/clece/cle-inn/coriot/node_modules/typeorm/driver/src/driver/sqlserver/SqlServerQueryRunner.ts:282:30)
at /home/nemesis/dev/clece/cle-inn/coriot/node_modules/mssql/lib/base/request.js:440:25
at Request.userCallback (/home/nemesis/dev/clece/cle-inn/coriot/node_modules/mssql/lib/tedious/request.js:492:15)
at Request.Request.callback (/home/nemesis/dev/clece/cle-inn/coriot/node_modules/tedious/src/request.ts:379:14)
at onEndOfMessage (/home/nemesis/dev/clece/cle-inn/coriot/node_modules/tedious/src/connection.ts:3713:22)
at Object.onceWrapper (node:events:632:28)
at Parser.emit (node:events:518:28)
at Readable.<anonymous> (/home/nemesis/dev/clece/cle-inn/coriot/node_modules/tedious/src/token/token-stream-parser.ts:30:12)
at Readable.emit (node:events:518:28)
at endReadableNT (node:internal/streams/readable:1696:12)
Adding the 'children.id' as proposed in the related issue makes the relation work, but it only includes the 'id' field. If I have all fields to be included, I have to write all of them, like this:
I have FOUR relations just in this entity. That's insane.
What about making select work in queries by default? I mean, making this /places?select=id,code,name,children filter the fields returned without setting up a select field in config.
Hi,
This issue is clearly related to #869 but the solution provided in that issue is not working for me.
If I use it like this, relations are loaded properly:
like in this result:
but if I include 'children' the
select
field:I get this error:
Adding the 'children.id' as proposed in the related issue makes the relation work, but it only includes the 'id' field. If I have all fields to be included, I have to write all of them, like this:
I have FOUR relations just in this entity. That's insane.
What about making
select
work in queries by default? I mean, making this/places?select=id,code,name,children
filter the fields returned without setting up aselect
field in config.Or What about using wildcards? Like this:
Any of those would be really helpful :)