Skip to content

Commit

Permalink
fix: foreignKeys aspect on association may not be set (#903)
Browse files Browse the repository at this point in the history
  • Loading branch information
patricebender authored Nov 20, 2024
1 parent 2948b27 commit 732a2f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db-service/lib/infer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1247,7 +1247,7 @@ function rejectNonFkNavigation(assoc, additionalInfo) {
*/
function isForeignKeyOf(e, assoc) {
if (!assoc.isAssociation) return false
return e in (assoc.elements || assoc.foreignKeys)
return e in (assoc.elements || assoc.foreignKeys || {})
}
const idOnly = ref => ref.id || ref

Expand Down

0 comments on commit 732a2f3

Please sign in to comment.