I would like to know if there is a way to make an entity "@Entity" and at the same time to embed it "@Embebbed" in morphia.
Possible code attachment
@Embedded
@Entity
public class Perfil {
@Id
private ObjectId id;
but when doing this, throw the following exception:
Exception in thread "main" org.mongodb.morphia.mapping.validation.ConstraintViolationException: Number of violations: 1 EmbeddedAndId complained about cl.psasoluciones.SistemaDe Comisisiones.modelo.MORPHIA.Profile. : @Embedded classes can not specify @Id field
Does anyone know if it can be done?