Hey, I was wondering if there is a way to retrieve...
# orm-help
s
Hey, I was wondering if there is a way to retrieve changesets on/after operations, especially when using nested writes or updates. Im aware of include, but this gives me all related records of an included relation, is there a way to retrieve only the created or changed relations?
r
@Sascha Ormanns 👋 I don’t think there’s any direct way as
include
would give all the records. But a workaround would be to use
take
to fetch only the latest changes needed and then
orderBy
the
updatedAt
field.
s
Hey @Ryan, but that wouldn't ensure it was my transaction that invoked the changes, would it? And I would need to know the changes I am interested in
r
Yeah, but I can’t seem to think of any other workaround. I would suggest opening a request here with the above use case so that we can look into this 🙂
s
Maybe I need to take a different approach to "compute" a changeset. Thanks @Ryan
👍 1