paulocaldeira17/angular-websql — pull request #8 by gfauchart (2014-07-15 20:19:00+00:00)
Title: table relationship automation 

#### you can inject model:
```js
var instance = $webSql.openDatabase("name", '1.0', 'Test DB', 2 * 1024 * 1024);
instance.addModel("articleLight", "article", [{
table : "comments",
insertName : "comments",
foreignKey : "article_id",
primaryKey : "id",
}],[{
table : "user",
insertName : "owner",
foreignKey : "user_id",
primaryKey : "id",
}]);
```

#### query they
instance
.selectModel("questionLight", buildSelector())
.then(function(questions){
console.log(questions)
})