Skip to content
This repository has been archived by the owner on Oct 28, 2019. It is now read-only.

Add join support #128

Closed
paulcsmith opened this issue Dec 1, 2017 · 0 comments
Closed

Add join support #128

paulcsmith opened this issue Dec 1, 2017 · 0 comments

Comments

@paulcsmith
Copy link
Member

paulcsmith commented Dec 1, 2017

This will be fairly difficult to tackle, but I'm happy to help. Feel free to reach out in https://gitter.im/luckyframework/Lobby for help

When you define an association with has_many or belongs_to it should add a number of fields to the BaseQuery

class Comment < BaseModel
  table :comments do
    belongs_to post : Post
  end
end

Comment::BaseQuery.new.join_post 
# or
.inner_join_post
.left_join_post

This should also work for has_many associations. This isn't that helpful on its own, but it will be required for #61 and #59

This will require:

@paulcsmith paulcsmith added this to the Ready for most projects milestone Dec 1, 2017
This was referenced Dec 1, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant