Is good idea to use Spring JPA entity classes from my data model as entities for domain model in domain driven design? Or should it be mapped into separated ddd entities.
What is best practice / recommended way?
According to dddsample-core we can have one model for both DDD and ORM. And in my opinion it worth to accept the consequences1 such as this one(Default constructor is required by ORM) and in return we have less duplication.
This may not be related to the question but I feel here is a good place to talk about it. Persistence frameworks abstract models as Entities and they don't usually distinguish them from ValueObjects. But in DDD models we need to clearly see if a model is a
Entity? So your 'Spring JPA entity class' must implements
ValueObject interface or
Entity interface to show this diff. In another words your 'Spring JPA entity calss' might be a ValueObject! and your design should show that clearly.
1: Depends to your chosen technology and frameworks, consequences of such a decision may be different, please take that into account also.