Skip to main content
Álvaro García's user avatar
Álvaro García's user avatar
Álvaro García's user avatar
Álvaro García
  • Member for 2 years, 8 months
  • Last seen more than a month ago
  • Spain
comment
Is it a good practice to allow null FKs?
Thanks for your detailed answer. But then, in TPT, if I misunderstood, if I want to know the total cost, I have to do two queries, one to know the total costs of the products and another to know the total cost of the service? This is two trips to the database, or perhaps could I use a union query?
awarded
comment
Is it a good practice to allow null FKs?
Really cost is not calculated. It is a value that the user set in each case. Anyway, calculated or not, which is the difference? At the end it is a value with the total cost. For example for a product, it is the price I pay for it to the provider. A service is the bill that I get from the person that does the service.
revised
Loading…
asked
Loading…
awarded
awarded
Loading…
comment
In the state pattern, what happens when the action doesn't depend only on the state?
@DocBrown Thanks for that. It is a good idea to use ChatGPT for that, sometimes my english is not very good.
Loading…
comment
Is it needed a unit of work with DDD?
At first I would think for the first option, to run the two operations in one transaction. But How and where I could implement the second option, using the extra step? In the application layer? Could you show and example and how it could be implemented?
asked
Loading…
comment
Is it needed a unit of work with DDD?
"DDD has the concept of separating out Aggregate Roots". Do you mean that one bounded context should to have only one AR?
accepted
Loading…
Loading…
1
2
3 4 5
7