-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
I have experimented with an Integer as Identifier:
public class Thing
implements AggregateRoot<Thing, ThingIdentifier> {
@Id private Thingdentifier id;
public record ThingIdentifier(Integer id) implements Identifier, Serializable {
public static ThingIdentifier of(Integer id) {
return new ThingIdentifier(id);
}
}
}
PrimitivesToIdentifierConverter and IdentifierToPrimitivesConverter only appear to accept String and UUID:
private static final Set<Class<?>> DEFAULT_PRIMITIVES = new HashSet<>(Arrays.asList(String.class, UUID.class));
What is the reason that an Integer is not an accepted identifier? Is it possible to use an Integer wrapped into an Identifier?
Metadata
Metadata
Assignees
Labels
No labels