-
-
Notifications
You must be signed in to change notification settings - Fork 367
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
"Invalid Class Typecast" Error with Active Record and Enumerated Type #583
Comments
marcelojaloto
added a commit
to marcelojaloto/delphimvcframework
that referenced
this issue
Oct 21, 2022
…ve Record and Enumerated Type;
@danieleteti Can you accept my Pull Request? |
marcelojaloto
added a commit
to marcelojaloto/delphimvcframework
that referenced
this issue
Oct 21, 2022
danieleteti#583 - Fixes bugs 'Invalid class typecast' when using Active Record and Enumerated Type
danieleteti
pushed a commit
that referenced
this issue
Oct 18, 2024
danieleteti
pushed a commit
that referenced
this issue
Nov 29, 2024
danieleteti
pushed a commit
that referenced
this issue
Jan 6, 2025
* Issue #546 was missing from the merge. * #581 - Fix error on removing default connection; * #583 - Fixes bugs 'Invalid class typecast' when using Active Record and Enumerated Type; * Fixes rendering in Swagger documentation for TArray type fields. * It also allows overriding the MapTValueToParam method of the TMVCActiveRecord class.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
1- When you use Active Record and need to insert an enumerated field type then the error below occurs:
Debugger Exception Notification
Project Server.exe raised exception class EInvalidCast with message 'Invalid class typecast'.
The solution for this problem you need to change
Ord(aValue.AsInteger)
toaValue.AsOrdinal
.Unit: MVCFramework.ActiveRecord
Method: MapTValueToParam
Class: TMVCActiveRecord
Line: 2013
2- Another error occurs when you use Active Record and you need to get an enumerated type field from the database.
Debugger Exception Notification
Project Server.exe raised exception class EInvalidCast with message 'Invalid class typecast'.
The solution for this problem you need include a new setting when field type is a Enumeration.
Unit: MVCFramework.Serializer.Commons
Line: 1115
Method: MapDataSetFieldToRTTIField
New Lines:
The text was updated successfully, but these errors were encountered: