<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Relationships on Devops Monk</title><link>https://devops-monk.com/tags/relationships/</link><description>Recent content in Relationships on Devops Monk</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sun, 03 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://devops-monk.com/tags/relationships/index.xml" rel="self" type="application/rss+xml"/><item><title>Entity Relationships: @OneToMany, @ManyToOne, @ManyToMany</title><link>https://devops-monk.com/tutorials/spring-boot/spring-data-jpa-relationships/</link><pubDate>Sun, 03 May 2026 00:00:00 +0000</pubDate><guid>https://devops-monk.com/tutorials/spring-boot/spring-data-jpa-relationships/</guid><description>Relationships are the trickiest part of JPA. A wrong cascade type or a missing mappedBy causes subtle bugs that appear in production. This article covers every relationship type with real examples and the pitfalls to avoid.
Relationship Fundamentals JPA relationships can be:
Direction: Unidirectional (one side knows about the other) or Bidirectional (both sides know each other) Cardinality: @OneToOne, @OneToMany, @ManyToOne, @ManyToMany Fetch: LAZY (load on access) or EAGER (load immediately) Ownership: The side with the foreign key column is the owner Default fetch types:</description></item></channel></rss>