INSERTにはinsertを使うサンプル
This commit is contained in:
parent
ea7504f564
commit
6d22032b61
7 changed files with 23 additions and 23 deletions
|
@ -18,9 +18,9 @@ export async function fetchMeta(noCache = false): Promise<Meta> {
|
|||
cache = meta;
|
||||
return meta;
|
||||
} else {
|
||||
const saved = await transactionalEntityManager.save(Meta, {
|
||||
const saved = await transactionalEntityManager.insert(Meta, {
|
||||
id: 'x'
|
||||
}) as Meta;
|
||||
}).then(x => transactionalEntityManager.findOneOrFail(Meta, x.identifiers[0]));
|
||||
|
||||
cache = saved;
|
||||
return saved;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue