You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In DDD, it's common to have a value object for the aggregate id, like this:
public class SomeAggregateId {
@Column("id")
private final SomeType value;
//.... constructors, getters, equals, toString, hashcode...
}
public class SomeAggregate {
@Id
private final SomeAggregateId id
//.... constructors, getters, equals, toString, hashcode, other methods...
}
I tried with embedded annotation too.
Unfortunately I could only make it work writing custom converters (JdbcCustomConversions) otherwise it tries to insert a null value into the id column in the database.
Therefore, to reduce the boilerplate code for converters, it would be great if Spring could handle this scenario natively, without requiring custom converters.
The text was updated successfully, but these errors were encountered:
In DDD, it's common to have a value object for the aggregate id, like this:
I tried with embedded annotation too.
Unfortunately I could only make it work writing custom converters (JdbcCustomConversions) otherwise it tries to insert a null value into the id column in the database.
Therefore, to reduce the boilerplate code for converters, it would be great if Spring could handle this scenario natively, without requiring custom converters.
The text was updated successfully, but these errors were encountered: