Hello,
In my adapter for FoundationDB I've been misusing the :prefix option to pass an opaque data structure from the caller to my adapter. (Specifically this is a tuple of the type `{:erlfdb_tenant, reference()}`, which is the handle to an open FDB Tenant).
It seems that the :context may be a more appropriate way of doing this, which is necessary as of 3.12, since the :prefix is now subjected to is_binary checks.
However, there is a nice feature of the :prefix that isn't present with :context.
```
tenant = open_tenant()
user = TestRepo.get(User, id, context: tenant)
assert ^tenant = Ecto.get_meta(user, :context) # fail
```
The assertion here fails, with the :context entry being nil. If you do something similar with :prefix, it works as expected.
I'd like to load the context into the struct metadata, so that future calls on the Repo can be made without the explicit option, and the user doesn't have to put it there explicitly.
I tried using the Ecto.Adapter.__before_compile__ to implement this behavior as custom to my adapter, but that requires that callers cannot use the standard Repo.get/3, which is not desirable.
Is it possible to automatically load the context into the struct metadata like what is done in Ecto.Schema.Loader.load_struct/3 ?
Thanks,
Jesse