-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[BUG]: Models\MetaData uses different keys for metaData and columnMap #16393
Labels
Comments
I have looked more into the matter, every time getAttributes() is called, getColumnMap() is also called either before or after. MetaData is InjectionAware, not initializeAware so there is no conflict. |
rudiservo
added a commit
to rudiservo/cphalcon
that referenced
this issue
Aug 6, 2023
rudiservo
added a commit
to rudiservo/cphalcon
that referenced
this issue
Aug 6, 2023
rudiservo
added a commit
to rudiservo/cphalcon
that referenced
this issue
Aug 6, 2023
rudiservo
added a commit
to rudiservo/cphalcon
that referenced
this issue
Aug 9, 2023
rudiservo
added a commit
to rudiservo/cphalcon
that referenced
this issue
Aug 9, 2023
rudiservo
added a commit
to rudiservo/cphalcon
that referenced
this issue
Aug 9, 2023
merged |
niden
added
status: low
Low
5.0
The issues we want to solve in the 5.0 release
and removed
status: unverified
Unverified
labels
Aug 11, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Don't know if it is really a bug or intentional, Models\MetaData uses different key logic to initialize the metaData and columnMap for a given model.
ColumnMap uses get_class_lower(model) has key, while metaData uses get_class_lower(model) . "-" . schema . source
leading different entries and key names for the same model.
I find this inconsistent for 2 reasons:
Metadata::initialize function does not use the two last parameters in the function (table and schema).
One of the tests (ReadMetadataCest) expects getAttributes to fetch metaData and columnMap from a CacheAdapter while getAttributes only returns metaDataIndex.
To Reproduce
Expected behavior
The same key entry for MetaData::metaData and MetaData::columnMap
getAttributes should only expect to retrieve and write to cache adapter MetaData has it is the only thing it returns.
Details
The text was updated successfully, but these errors were encountered: