Skip to main content

Questions tagged [value-object]

0 votes
2 answers
128 views

I am practicing tactical DDD and having trouble as exemplified below. Fundamentally, whether some fields of the value object should be nullable depends on another field of the same value object. ...
STHA's user avatar
  • 71
1 vote
3 answers
225 views

Let's say I have a Mail, this mail have many properties given by the constructor (for example, 10-15 parameters). This mail can't be edited (immutable), the user has specifically requested to send ...
Vianney's user avatar
  • 119
0 votes
2 answers
1k views

After reading about Value Objects, I think they're pretty cool and should be used, but I am not sure if I am doing it the right way. Let's assume that I have a simple DTO to create a user, which ...
Mercury's user avatar
  • 81
0 votes
1 answer
432 views

I have an Entity type, let's say Car for example. There is a Value Object type Tire for it. Each car has a set of tires with certain properties. Sometimes tires are replaced, which is communicated by ...
Erik Hofer's user avatar
0 votes
1 answer
844 views

Here is the conundrum, I have a fairly complex Value Object and I don't want to expose it's internals. It should not be an Entity since there is no need for attaching an identity to it. According to ...
Tetra's user avatar
  • 3
0 votes
1 answer
194 views

My aggregate root is "Post" and sub aggregate is "Comment". In my database I have a table called "ForbiddenWords" with one column "Name" (it contains words for ...
Aleksander M's user avatar
2 votes
1 answer
1k views

I have a value object to hold a user id number as a string. This number has a unique format throughout my domain. So, it's being validated inside the object during instantiation and an exception is ...
Pavi's user avatar
  • 131
0 votes
0 answers
87 views

Where do you like to draw the line for modeling a single value as a Value Object v.s. a primitive? For example if I have an internal order number and a customer order number, would you model them both ...
secondbreakfast's user avatar
0 votes
3 answers
2k views

As I learned from the DDD rules, you have to change the entity through the aggregate root. However let's say we have a value object "Address". Is it allowed to do in the AR: (I've seen this ...
Jesse's user avatar
  • 223
0 votes
1 answer
771 views

Let's say we have an entity Customer which can have multiple email addresses. We create a ValueObject "EmailAddress", upon creation it checks if the address is valid. Is this concept valid ...
Jesse's user avatar
  • 223
0 votes
2 answers
1k views

Hi I am making a Value Object. public class Age { public Age(int age) { Value = age } public int Value { get; private set; } } I want to check ...
honey_ramgarhia's user avatar
0 votes
1 answer
478 views

I'm studying DDD at the same time that I'm reading some Khalil Stemmler posts and I'm a little confused about who should initialize the VO: the entity it is related to or the useCase that uses that ...
Tâmer Cuba's user avatar
0 votes
1 answer
575 views

I have a Message class that represent some data sent by a smartwatch. A Message has a header (sender, length...) and a type; it can be a location update, an alarm message... There are about thirty ...
Hillel SAAL's user avatar
-1 votes
2 answers
677 views

Suppose that I have a Value Object representing an Image URL of a Cake. To check that it really is a cake, I make an asynchronous API call to a server that checks whether the image really represents ...
Hillel SAAL's user avatar
5 votes
4 answers
2k views

What are the relationships between these pairs of concepts: value/reference type; value/reference object; value/reference semantics? For the first pair of concepts, it seems to me that an object of ...
Géry Ogam's user avatar

15 30 50 per page