私は永続化したい単純なPOSO GroupACLTemplate
を持っています。これは、抽象クラスから継承されています。私は@Entity
でそれを注釈を付け、さらにGroupACLTemplate
のモルフィアは私の@ID注釈付きフィールドを認識しません
@Entity("aclTemplate")
@SerialVersionUID(1L)
class GroupACLTemplate(@([email protected]) id: String, groupRoleAccess: Set[GroupRoleAccess]) extends AclTemplate(id) with Serializable
私は戦争を展開@Id
、私は見ておりません任意のコレクションを持っています。また、私はテストケースを追加しました。この
class GroupACLTemplate(@Id id: String, groupRoleAccess: Set[GroupRoleAccess]) extends AclTemplate(id) with Serializable
を試してみましたが、この
@Inject
var aclTemplateRepository: AclTemplateRepository = _
aclTemplateRepository.save(aclTemplate.head)
のようなオブジェクトを保存しようとしたエラーが
NoId complained about com.java.sample.acl.GroupACLTemplate. : No field is annotated with @Id; but it is required
が、私はここで何かをしないのですと言いますか?
から1からIDを使用する必要があります – rockydgeekgod
ありがとうございます。あなたのために何かをすぐに手に入れようとします。 – evanchooly