Are domain objects the same as JPA objects?

Are domain objects the same as JPA objects? If I have a value object (for example, a dollar bank), how can I (or even should) store it in a data warehouse as a reference object?

What are the subtleties of domain objects that are objects in some cases and value objects in other cases? Can someone direct me on good paper?

+5
source share
4 answers

"Domain object" is a more conceptual term; “Essence JPA” refers to a particular technology useful for implementing domain objects.

(, , ..) . , . , ORM , , .

- ORM, . .

, , , .

.

JPA - , @Entity, @Column, @ManyToOne .. . , .

+5

Domain Driven Design . , . , JPA.

0

, - , . JPA .

0

, JPA?

, .

(, ), ( ) ?

Value @Embeddable. VO @Id, ( TABLE, ). @ElementCollection.

@Emedded Value :

  • JOINS, @OneToOne.
  • DELETE .

, , ?

- , @Id, Value Objects . Value , entites/domain-objects -, .

In some business cases, you need to represent a Domain object as a Value object, such as a Snapshot, which you, for example, move to another aggregate or publish inside a domain event.

Can someone direct me on good paper?

Book: Implementing a Domain-Managed Project, Vaughn Vernon.

0
source

All Articles