-
Notifications
You must be signed in to change notification settings - Fork 364
Closed as not planned
Labels
status: duplicateA duplicate of another issueA duplicate of another issue
Description
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.
Metadata
Metadata
Assignees
Labels
status: duplicateA duplicate of another issueA duplicate of another issue