File tree Expand file tree Collapse file tree
tests/specs/integration/BaseEntity/Relationships Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -278,7 +278,10 @@ component accessors="true" transientCache="false" {
278278 }
279279 }
280280
281- var subselectName = getEntity ().get_str ().camel ( relationName & " Count" );
281+ var subselectNameArray = getEntity ().get_str ().words ( relationName );
282+ subselectNameArray .append ( " Count" );
283+
284+ var subselectName = getEntity ().get_str ().camel ( subselectNameArray .toList ( " " ) );
282285 if ( findNoCase ( " as " , relationName ) ) {
283286 var parts = relationName .split ( " \s(?:A|a)(?:S|s)\s" );
284287 relationName = parts [ 1 ];
@@ -339,7 +342,10 @@ component accessors="true" transientCache="false" {
339342 var attributeName = listLast ( relationName , " ." );
340343 relationName = listFirst ( relationName , " ." );
341344
342- var subselectName = getEntity ().get_str ().camel ( " Total " & relationName );
345+ var subselectNameArray = [ " Total" ];
346+ subselectNameArray .append ( getEntity ().get_str ().words ( relationName ), true );
347+
348+ var subselectName = getEntity ().get_str ().camel ( subselectNameArray .toList ( " " ) );
343349 if ( findNoCase ( " as " , attributeName ) ) {
344350 var parts = attributeName .split ( " \s(?:A|a)(?:S|s)\s" );
345351 attributeName = parts [ 1 ];
Original file line number Diff line number Diff line change @@ -252,6 +252,14 @@ component extends="tests.resources.ModuleIntegrationSpec" {
252252 expect ( countries [ 2 ].getId () ).toBe ( " 02BA2DB0-EB1E-3F85-5F283AB5E45608C6" );
253253 expect ( countries [ 2 ].getName () ).toBe ( " Argentina" );
254254 expect ( countries [ 2 ].getPostsDeepCount () ).toBe ( 1 );
255+
256+ var countryMementoKeys = countries [ 2 ].getMemento ().keyArray ();
257+ arraySort ( countryMementoKeys , " text" );
258+ expect ( countryMementoKeys [ 1 ] ).toBeWithCase ( " createdDate" );
259+ expect ( countryMementoKeys [ 2 ] ).toBeWithCase ( " id" );
260+ expect ( countryMementoKeys [ 3 ] ).toBeWithCase ( " modifiedDate" );
261+ expect ( countryMementoKeys [ 4 ] ).toBeWithCase ( " name" );
262+ expect ( countryMementoKeys [ 5 ] ).toBeWithCase ( " postsDeepCount" );
255263 } );
256264
257265 it ( " can return the QuickBuilder instance generated for the count" , function () {
You can’t perform that action at this time.
0 commit comments