Closed tolgaek closed 11 years ago
I think you can probably use schema.adapter.query
if you really feel like it, at least with the mysql adapter.
@dgsan yep, correct.
I am not able to access the adapter
method on the schema, it only has validations
hooks
and basic query
methods. Can anyone confirm this is still how you get direct access to the query?
schema.adapter.query(sql, function (err, data) {
// etc ...
});
I am trying to do a basic autocomplete using a query like this.
SELECT * FROM table WHERE name LIKE 'sanitizedInput%'
ive tried
{
where:{
name:{
like: input
}
}
}
ORM can only take you so far before you need to execute some raw queries for optimizations..
Is this a feature that should be implemented?