# Optimistic Locking clarification?

**URL:** <https://forum.elixirforum.com/t/optimistic-locking-clarification/60488>\
**Category:** Questions\
**Tags:** ecto, troubleshooting, optimistic\_lock\
**Created:** [December 20, 2023, 11:30pm UTC](https://forum.elixirforum.com/t/optimistic-locking-clarification/60488 "2023-12-20T23:30:28Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![woylie](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/woylie/32/38856_2.png) [@woylie](https://forum.elixirforum.com/u/woylie)\
**Post date:** [December 20, 2023, 11:33pm UTC](https://forum.elixirforum.com/t/optimistic-locking-clarification/60488/2 "2023-12-20T23:33:26Z")

</div>

It just gets the field from the changeset source:

[https://github.com/elixir-ecto/ecto/blob/4a143348ab89e0174a1a5082fd47d868ebd9689b/lib/ecto/changeset.ex#L3418](https://github.com/elixir-ecto/ecto/blob/4a143348ab89e0174a1a5082fd47d868ebd9689b/lib/ecto/changeset.ex#L3418)

You don’t need to cast just to access the source data. And you don’t want to cast the lock version, because you don’t want the value to be set from the parameters.

---

_[View the full topic](https://forum.elixirforum.com/t/optimistic-locking-clarification/60488)._
