Skip to content

Latest commit

 

History

History
28 lines (21 loc) · 1.27 KB

README.md

File metadata and controls

28 lines (21 loc) · 1.27 KB

EctoClone

Build Status Version Hex Docs Download License Last Updated

Take advantage of Ecto associations to deep clone data in your database.

To clone a post with it's comments and tags:

{:ok, cloned_post_id} = EctoClone.clone(%Post{id: 5}, Repo, %{title: "new title"}, [Comment, PostTag])

See clone docs for more information and examples.

Todo

  • error when intermediate schemas are missing
  • support mysql
  • support sqlite
  • clone tables in parallel
  • fix self references in parallel
  • support foreign key != :id
  • error when circular associations