@@ -7,7 +7,6 @@ export class VersionedGuidance extends MySqlModel {
77 public guidanceId ?: number ;
88 public guidanceText ?: string ;
99 public tagId : number ;
10- public tags ?: Tag [ ] ;
1110
1211 private static tableName = 'versionedGuidance' ;
1312
@@ -18,7 +17,6 @@ export class VersionedGuidance extends MySqlModel {
1817 this . guidanceId = options . guidanceId ;
1918 this . guidanceText = options . guidanceText ;
2019 this . tagId = options . tagId ;
21- this . tags = options . tags ;
2220 }
2321
2422 // Validation to be used prior to saving the record
@@ -43,7 +41,7 @@ export class VersionedGuidance extends MySqlModel {
4341 // First make sure the record is valid
4442 if ( await this . isValid ( ) ) {
4543 this . prepForSave ( ) ;
46-
44+
4745 // Save the record and then fetch it
4846 const newId = await VersionedGuidance . insert ( context , VersionedGuidance . tableName , this , 'VersionedGuidance.create' , [ 'tags' ] ) ;
4947 return await VersionedGuidance . findById ( 'VersionedGuidance.create' , context , newId ) ;
@@ -78,10 +76,10 @@ export class VersionedGuidance extends MySqlModel {
7876 if ( ! tagIds || tagIds . length === 0 ) {
7977 return [ ] ;
8078 }
81-
79+
8280 const placeholders = tagIds . map ( ( ) => '?' ) . join ( ', ' ) ;
8381 const sql = `
84- SELECT DISTINCT vg.*
82+ SELECT DISTINCT vg.*
8583 FROM ${ VersionedGuidance . tableName } vg
8684 INNER JOIN versionedGuidanceGroups vgg ON vg.versionedGuidanceGroupId = vgg.id
8785 INNER JOIN versionedGuidanceTags vgt ON vg.id = vgt.versionedGuidanceId
@@ -97,10 +95,10 @@ export class VersionedGuidance extends MySqlModel {
9795 if ( ! tagIds || tagIds . length === 0 ) {
9896 return [ ] ;
9997 }
100-
98+
10199 const placeholders = tagIds . map ( ( ) => '?' ) . join ( ', ' ) ;
102100 const sql = `
103- SELECT DISTINCT vg.*
101+ SELECT DISTINCT vg.*
104102 FROM ${ VersionedGuidance . tableName } vg
105103 INNER JOIN versionedGuidanceGroups vgg ON vg.versionedGuidanceGroupId = vgg.id
106104 INNER JOIN guidanceGroups gg ON vgg.guidanceGroupId = gg.id
0 commit comments