I must use ValueObject in the project and JPA at the same time, but when changing the attribute to valueobject it gives me an error, I don't know yet how to solve the problem
this error: ('Id' attribute type should not be 'BrandCodigo') ('Basic' attribute type should not be 'BrandNombre' )
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Entity(name = "Brand")
@Table(name = "marcas",
uniqueConstraints = {
@UniqueConstraint(name = "uk_marcas_nombre",columnNames = "nombre")
})
public class Brand {
@Id
@Column(name = "codigo")
private BrandCodigo codigo;
@Column(name = "nombre",
nullable = false,
columnDefinition = "varchar(80)"
)
private BrandNombre nombre;
}