question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Owned] entities does not trigger hooks

See original GitHub issue

A is an owned entity. There are 2 other entities B and C which both use A. E.g.

[Owned]
public class A {
  // ...
}

public class B {
  public A MyA { get; set; }
  // ...
}

public class C {
  public A MyA { get; set; }
  // ...
}

Current behavior: You can’t add triggers to A (reasonable). Whenever any change on A happens, no triggeres are triggered (e.g. on B or C).

Expected behavior: Whenever anything changes on B.MyA, any trigger for B is triggered. Whenever anything changes on C.MyA, any trigger for C is triggered.

Issue Analytics

  • State:closed
  • Created 6 months ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
cjblomqvistcommented, Mar 30, 2023

(one could also argue whether it makes sense to trigger on the principle entity or not - since the definition of owned is DDD Aggregate then I think there’s quite a clear case for that, but anyhow)

0reactions
stale[bot]commented, Jun 9, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Custom hook not triggering component rerender despite ...
I'm using this hook in another component. Problem: Changes to the state values returned by the hook ( loading and document ) do...
Read more >
Last hook to be called after entity save? - Drupal Answers
Yes, there is an addon module which provides hook to invoke after an entity is saved. It's called Hook Post Action. This was...
Read more >
What is the recommended way to do DDD Value Objects in ...
Owned types are not a good fit because they have keys, even though the key might be hidden. This results in non-obvious behaviors...
Read more >
Understanding common frustrations with React Hooks
While the response to Hooks has been overwhelmingly positive, we are going to look at some of the not so popular parts of...
Read more >
React Hooks cheat sheet: Best practices with examples
Editor's note: This React Hooks tutorial was last updated on 6 March 2023 to include more React Hooks best practices and examples.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found