Skip to content

Commit 4009d9c

Browse files
Mapping relationship in composite key
1 parent 3f27790 commit 4009d9c

File tree

1 file changed

+2
-2
lines changed
  • HibernateSpringBootCompositeKeyEmbeddableMapRel

1 file changed

+2
-2
lines changed

HibernateSpringBootCompositeKeyEmbeddableMapRel/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
**[How To Define A Composite Primary Key Via `@Embeddable`](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootCompositeKeyEmbeddable)**
1+
**[How To Define A Relationship in an `@Embeddable` Composite Primary Key](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootCompositeKeyEmbeddableMapRel)**
22

3-
**Description:** This application is a proof of concept of how to define a composite key via `@Embeddable` and `@EmbeddedId`. This application uses two entities, `Author` and `Book` involved in a lazy bidirectional `@OneToMany` relationship. The identifier of `Author` is composed by `name` and `age` via `AuthorId` class. The identifier of `Book` is just a typical auto-generated numeric value.
3+
**Description:** This application is a proof of concept of how to define a relationship in an `@Embeddable` composite key. The composite key is `AuthorId` and it belongs to the `Author` class.
44

55
**Key points:**\
66
- The composite key class (e.g., `AuthorId`) is `public`\

0 commit comments

Comments
 (0)