getLimitSql was returning the wrong value for limit $limit
Dont quote fields
If * or has a . dont quote field
Missed some changes in has many through
Update fixing insert into pivot tables