@@ -248,7 +248,7 @@ function clean (done) {
248248 return db . schema
249249 . createTable ( 'employees' , table => {
250250 table . increments ( 'id' ) ;
251- table . integer ( 'companyId' ) . references ( 'companies.id' ) ;
251+ table . integer ( 'companyId' ) ;
252252 table . string ( 'name' ) ;
253253 } ) ;
254254 } ) ;
@@ -258,7 +258,7 @@ function clean (done) {
258258 return db . schema
259259 . createTable ( 'clients' , table => {
260260 table . increments ( 'id' ) ;
261- table . integer ( 'companyId' ) . references ( 'companies.id' ) ;
261+ table . integer ( 'companyId' ) ;
262262 table . string ( 'name' ) ;
263263 } )
264264 . then ( ( ) => done ( ) ) ;
@@ -1771,7 +1771,7 @@ describe('Feathers Objection Service', () => {
17711771 } ) ;
17721772 } ) ;
17731773
1774- it ( 'allow $modify query with paginate and groupBy' , ( ) => {
1774+ it ( 'allow $modify query with paginate and groupBy and joinRelation ' , ( ) => {
17751775 companies . options . paginate = {
17761776 default : 1 ,
17771777 max : 2
@@ -1784,6 +1784,19 @@ describe('Feathers Objection Service', () => {
17841784 } ) ;
17851785 } ) ;
17861786
1787+ it . skip ( 'allow $modify query with paginate and groupBy and eager' , ( ) => {
1788+ companies . options . paginate = {
1789+ default : 1 ,
1790+ max : 2
1791+ } ;
1792+
1793+ return companies . find ( { query : { $modify : [ 'googleWithEager' ] , $eager : 'employees' } } ) . then ( data => {
1794+ expect ( data . total ) . to . be . equal ( 1 ) ;
1795+ expect ( data . data . length ) . to . be . equal ( 1 ) ;
1796+ expect ( data . data [ 0 ] . name ) . to . be . equal ( 'Google' ) ;
1797+ } ) ;
1798+ } ) ;
1799+
17871800 it ( 'allow $modify query as string' , ( ) => {
17881801 return companies . find ( { query : { $modify : 'google' } } ) . then ( data => {
17891802 expect ( data . length ) . to . be . equal ( 1 ) ;
0 commit comments