Skip to content

Commit

Permalink
PRESIDECMS-2962 ensure query against bigint field uses bigint data type
Browse files Browse the repository at this point in the history
Otherwise you miss getting any versions that are above the int limit
  • Loading branch information
DominicWatson committed Oct 25, 2024
1 parent 7aba4c9 commit 63ec733
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion system/services/presideObjects/PresideObjectService.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -3383,7 +3383,7 @@ component displayName="Preside Object Service" {

if ( arguments.specificVersion ) {
versionFilter = "#arguments.objectName#._version_number = :#arguments.objectName#._version_number";
params.append( { name="#arguments.objectName#___version_number", value=arguments.specificVersion, type="cf_sql_int" } );
params.append( { name="#arguments.objectName#___version_number", value=arguments.specificVersion, type="cf_sql_bigint" } );

if ( !arguments.allowDraftVersions && usesDrafts ) {
versionFilter &= " and ( #arguments.objectName#._version_is_draft is null or #arguments.objectName#._version_is_draft = :#arguments.objectName#._version_is_draft )";
Expand Down

0 comments on commit 63ec733

Please sign in to comment.