Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ecto 1.1 Changes a bunch of things #70

Closed
geofflane opened this issue Dec 15, 2015 · 2 comments
Closed

Ecto 1.1 Changes a bunch of things #70

geofflane opened this issue Dec 15, 2015 · 2 comments

Comments

@geofflane
Copy link
Contributor

The breaking change is is Ecto.Association.loaded? is no longer a function, but they've added Ecto.assoc_loaded? as a public function.

There are some deprecation warnings too from changes in the handling of assoc, embed, etc inside of changesets is different now and causes warnings in ex_machina right now.

.warning: changing assocs with change/2 or put_change/3 is deprecated, please use put_assoc/3 instead
    (stdlib) lists.erl:1262: :lists.foldl/3
    (ecto) lib/ecto/changeset.ex:247: Ecto.Changeset.change/2
    (ex_machina) lib/ex_machina/ecto.ex:128: ExMachina.Ecto.save_record/3
    test/ex_machina/ecto_has_many_test.exs:77: ExMachina.EctoHasManyTest."test create/2 saves overriden `has_many` associations"/1
.warning: changing assocs with change/2 or put_change/3 is deprecated, please use put_assoc/3 instead
    (stdlib) lists.erl:1262: :lists.foldl/3
    (ecto) lib/ecto/changeset.ex:247: Ecto.Changeset.change/2
    (ex_machina) lib/ex_machina/ecto.ex:128: ExMachina.Ecto.save_record/3
    test/ex_machina/ecto_has_many_test.exs:85: ExMachina.EctoHasManyTest."test create/1 creates a record without any associations"/1
.warning: changing assocs with change/2 or put_change/3 is deprecated, please use put_assoc/3 instead
    (stdlib) lists.erl:1262: :lists.foldl/3
    (ecto) lib/ecto/changeset.ex:247: Ecto.Changeset.change/2
    (ex_machina) lib/ex_machina/ecto.ex:128: ExMachina.Ecto.save_record/3
    test/ex_machina/ecto_has_many_test.exs:67: ExMachina.EctoHasManyTest."test create/1 saves `has_many` records defined in the factory"/1
.warning: changing assocs with change/2 or put_change/3 is deprecated, please use put_assoc/3 instead
    (stdlib) lists.erl:1262: :lists.foldl/3
    (ecto) lib/ecto/changeset.ex:247: Ecto.Changeset.change/2
    (ex_machina) lib/ex_machina/ecto.ex:128: ExMachina.Ecto.save_record/3
    (ex_machina) lib/ex_machina/ecto.ex:142: anonymous fn/3 in ExMachina.Ecto.persist_belongs_to_associations/2
.warning: changing embeds with change/2 or put_change/3 is deprecated, please use put_embed/3 instead
    (stdlib) lists.erl:1262: :lists.foldl/3
    (ecto) lib/ecto/changeset.ex:247: Ecto.Changeset.change/2
    (ex_machina) lib/ex_machina/ecto.ex:128: ExMachina.Ecto.save_record/3
    test/ex_machina/ecto_embeds_test.exs:42: ExMachina.EctoEmbedsTest."test create/1 saves `embeds_one` record defined in the factory"/1
.warning: changing embeds with change/2 or put_change/3 is deprecated, please use put_embed/3 instead
    (stdlib) lists.erl:1262: :lists.foldl/3
    (ecto) lib/ecto/changeset.ex:247: Ecto.Changeset.change/2
    (ex_machina) lib/ex_machina/ecto.ex:128: ExMachina.Ecto.save_record/3
    test/ex_machina/ecto_embeds_test.exs:50: ExMachina.EctoEmbedsTest."test create/2 saves `embeds_one` record when overridden"/1
@geofflane geofflane mentioned this issue Dec 15, 2015
@geofflane
Copy link
Contributor Author

I PR'ed a fix for the breaking change, but don't exactly know how to fix the deprecations.

@paulcsmith
Copy link
Contributor

Thanks for reporting this @geofflane. The next version should fix all of these, including the warnings See #73 for details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants