Closed as not planned
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.