arangodb / spring-data

Spring Data ArangoDB
https://www.arangodb.com/docs/stable/drivers/spring-data-getting-started.html
Apache License 2.0
111 stars 56 forks source link

Auto-persistence of associations with null ids would be beneficial (for users & ArangoDB) #12

Open haqer1 opened 6 years ago

haqer1 commented 6 years ago

For instance, for the https://github.com/arangodb/spring-data#reference example, when address.id is null, it's not currently auto-persisted; thus it currently has to be persisted separately (prior to persisting the parent entity). In JPA implementations i've worked with, the association(s) would be auto-persisted (allowing to persist an entire aggregate[1] by making only 1 call to persist the aggregate root).

I think it would be beneficial (for users & ArangoDB) if arangodb/spring-data functioned similarly: it would make development easier, & facilitate adoption of ArangoDB. The implementation also shouldn't be difficult...

[1] https://martinfowler.com/bliki/DDD_Aggregate.html

mvollmary commented 6 years ago

Hi @haqer1,

thanks for the feedback. I'll put that on my todo list.

best Mark