User Tools

Site Tools


programming:java:jpa

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
programming:java:jpa [2023/11/01 07:31] – removed - external edit (Unknown date) 127.0.0.1programming:java:jpa [2023/11/01 07:31] (current) – ↷ Page moved from camunda:programming:java:jpa to programming:java:jpa skipidar
Line 1: Line 1:
 +===== Java Persistance API =====
 +JPA is an API, provided by Oracle.
  
 +Hibernate, EclipseLink etc. are implementations of that API.
 +
 +
 +=== Entity ===
 +=== Entity Annotaions ===
 +
 +These annotations should be red as following:
 +  * The first part is applied to the object, which contains the property
 +  * The second part is applied to propery (which should be an entity)
 +
 +|<WRAP><code>
 +class wood
 +
 +@OneToMany
 +@JoinColumn(name="wood")
 +Set<Tree> tree
 +</code></WRAP>| Object **wood**. Property **tree**. One wood has many trees. Property has to be a collection |
 +|<WRAP><code>
 +class tree
 +
 +@ManyToOne
 +@JoinColumn(name="tree")
 +Wood wood
 +</code></WRAP>| Object **tree**. Property **wood**. Many trees in wood. |