๐์ค๋ฅ
No EntityManager with actual transaction available for current thread - cannot reliably process 'merge' call
์ผ๋ถ ์ปฌ๋ผ์ ์ ๋ฐ์ดํธ ํ๋ ๋ฉ์๋๋ฅผ ์คํํ๋ ค๊ณ ํ๋๋ฐ ๋ฐ์ํ ์ค๋ฅ
โ๏ธ์์ธ
๊ธฐ๋ณธ์ ์ผ๋ก JPA๋ transaction์ ๊ธฐ๋ฐ์ผ๋ก ์๋ํ๊ฒ ๋์ด์์
transaction ๋จ์์ ๋ฐ๋ผ 1์ฐจ ์บ์์์ญ์ ์๋ ๊ฐ์ฒด๋ค์ด db์ flush๋์ด ์์ํ๋๊ธฐ ๋๋ฌธ
๊ทธ๋ฌํ ์์ ์์ ์ ํ๋ persist() ๋ฉ์๋์ ๊ฐ์ฒด๊ฐ ๋ค์ด๊ฐ์ผ๋ ๊ฐ๋ฅํ transaction์ด ์กด์ฌํ์ง ์์๊ธฐ์ ๋ฐ์ํ ์ค๋ฅ
โ๏ธํด๊ฒฐ
ํด๋น ์์ ์ ์คํํ๋ ๋ฉ์๋์ `@Transactional` ์ ์ธํด์ค
'Trouble Shooting' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
ids for this class must be manually assigned before calling save(): (0) | 2023.11.25 |
---|---|
Stream Collectors toMap ์ค๋ณตํค์ฒ๋ฆฌํ๊ธฐ(Duplicate Key error) (1) | 2023.11.25 |
[Java] java.lang.Long cannot be cast to java.lang.Integer (0) | 2023.10.12 |
NonUniqueDiscoveredSqlAliasException ์ค๋ฅ (0) | 2023.10.11 |
[JPA] Cannot call sendError() after the response has been committed (0) | 2023.09.26 |