[micronaut/Grails] GORM Many-to-Many の保存と更新順序

忘れがちなので備忘録として

の二つがあって、Many to Many の関係にある。
この時、保存は以下の順序で行う。

DomainAのList(domainAList) と、DomainB(domainB)がある場合、
DomainB に、DomainA を全て入れてから、DomainBを保存する

更新は、DomainAのListと、DomainBがある場合
DomainAのListのコピーを作成しておき、(domainAListCopy) 、以下のように行う

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy