Repository navigation
fix: Use proper camelCase for detach method parameters with multi-word class names - #4082
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Comment |
|
@copilot - The generate test is failing in the CI. Could you run the |
Done! I've run the |
|
@copilot |
Updated the test expectations on lines 297 and 312. Changed |
|
@copilot - please rebase this PR on latest main. |
…names Co-authored-by: SandPod <[email protected]>
Co-authored-by: SandPod <[email protected]>
Co-authored-by: SandPod <[email protected]>
8aafc1d to
2960656
Compare
nielsenko
left a comment
There was a problem hiding this comment.
These changes looks good. However, they are not breaking as the parameters are always positional.
Fix detach method parameter name casing for multi-word class names
This PR fixes a bug where the detach method for object relations generates parameter names in all lowercase instead of proper lowerCamelCase when the class name contains multiple words.
Issue Reference: Fixes #2448
Root Cause:
In
repository_classes.dartline 1634, the_buildDetachRowFromObjectRelationFieldmethod usesclassName.toCamelCase(isLowerCamelCase: true)which converts multi-word class names likeCitizenInttocitizenint(all lowercase) instead ofcitizenInt(proper camelCase).Changes Made:
_buildDetachRowFromObjectRelationFieldto useclassName.camelCaseinstead ofclassName.toCamelCase(isLowerCamelCase: true)(line 1633)import 'package:super_string/super_string.dart';(line 6)database_repository_class_object_relation_additions_test.dartfor multi-word class namesutil/generate_allscriptattach_detach_test.dartto match corrected parameter namesExamples of Fixed Code:
Other affected classes:
AddressUuid→ parameter nowaddressUuid(wasaddressuuid)UserProfile→ parameter nowuserProfile(wasuserprofile)Testing:
--fatal-infosBreaking Change Note:
None.
Security Summary:
No security vulnerabilities were introduced or discovered during this change. CodeQL analysis returned no issues.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.