ORM for TypeScript and JavaScript. Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, SAP Hana, WebSQL databases. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms.
i want to get the latest (by createdAt) associated HubStatus in @AfterLoadhook. max can't be used in where clause, i also tried multiple options of using max in select and they fail for different reasons.
Issue type:
[x] question [ ] bug report [ ] feature request [ ] documentation issue
Database system/driver:
[ ]
cordova
[ ]mongodb
[ ]mssql
[ ]mysql
/mariadb
[ ]oracle
[x]postgres
[ ]cockroachdb
[ ]sqlite
[ ]sqljs
[ ]react-native
[ ]expo
TypeORM version:
[x]
latest
[ ]@next
[ ]0.x.x
(or put your version here)Have quite typical problem i think - what is the proper way to select the latest entity of
OneToMany
relationship by typeorm?schema:
i want to get the latest (by
createdAt
) associatedHubStatus
in@AfterLoad
hook. max can't be used in where clause, i also tried multiple options of using max in select and they fail for different reasons.