๋ฐ˜์‘ํ˜•

Springboot ๊ณต๋ถ€ 1

[Springboot] JPA Projection ํ”„๋กœ์ ์…˜ ํ•˜๋Š” ๋ฐฉ๋ฒ•

Intro ์•ˆ๋…•ํ•˜์„ธ์š”. ์ด๋ฒˆ ์‹œ๊ฐ„์—๋Š” Springboot ์Šคํ”„๋ง๋ถ€ํŠธ JPA์—์„œ ํ”„๋กœ์ ์…˜ ํ•˜๋Š” ๋ฐฉ๋ฒ•์— ๋Œ€ํ•ด ์•Œ์•„๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. Projection? ๋จผ์ € ๋“ค์–ด๊ฐ€๊ธฐ์— ์•ž์„œ ๊ฐ„๋‹จํ•˜๊ฒŒ ํ”„๋กœ์ ์…˜์— ๋Œ€ํ•œ ์˜๋ฏธ๋ฅผ ์‚ดํŽด๋ณผ๊ฒŒ์š”. ํ”„๋กœ์ ์…˜์€ ์—”ํ‹ฐํ‹ฐ์˜ ์†์„ฑ์ด ๋งŽ์„ ๋•Œ ์ผ๋ถ€ ๋ฐ์ดํ„ฐ๋งŒ ๊ฐ€์ ธ์˜ค๋Š” ๋ฐฉ๋ฒ•์„ ์˜๋ฏธํ•ฉ๋‹ˆ๋‹ค. ๋” ์ž์„ธํ•œ ๋‚ด์šฉ์ด ๊ถ๊ธˆํ•˜์‹œ๋ฉด ์ผ์ „์— ์ œ๊ฐ€ ์ •๋ฆฌํ•ด๋†“์€ ํฌ์ŠคํŒ… ์ฐธ๊ณ  ๋ฐ”๋ž๋‹ˆ๋‹ค :) [MongoDB] ํ”„๋กœ์ ์…˜ (Projection) ์ด๋ž€? projection query ์‚ฌ์šฉ๋ฒ• How to do ์•„๋ž˜์˜ User domain ๊ฐ์ฒด๋ฅผ ์ฐธ๊ณ ํ•˜์—ฌ ์„ค๋ช…ํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. @Document(collection = "user") class User( val userId: String?, val userName: String?, val user..

๋ฐ˜์‘ํ˜•