Sam Johnson

Results 173 comments of Sam Johnson

this was my workaround: ```crystal def views View.query.inner_join("spaces"){ raw("views.space_id = spaces.id AND spaces.account_id = #{id}") } end ```

I think the rails way of viewing `has_many: :through` is it covers any situation where there is some model `A`, some intermediate model, `B`, and some model `C`, where `B`...

update: here are the possible situations (I think): 1. `A` => `has_many` => `B` => `has_many` => `C` 2. `A` => `has_one | belongs_to` => `B` => `has_many` => `C`...

my use case is migrating to particular migration numbers, and a `cake exec` command that executes the input string as crystal code within the app environment and prints the result.

`ARGV` comes up empty when read from within a task -- I'm guessing it is consumed by the `cake` binary

The alternative would be `cake db migrate` which I'd also be fine with.

Could you give me a really high level brief description of where I could find the part of the code that needs to be changed? I've been poking around the...

I am also no longer able to build the current mongo-c-driver version on ubuntu 18.04

@dylandy here is how I did it: https://github.com/sam0x17/crystal-mongo-orm/blob/3262bc6880d7c6ec8e2f756bfc9a1a8050b71bc2/src/mongo_orm/querying.cr#L88 Note that my ORM is able to do this out of the box using the `Model.all` method, as you mention. https://github.com/sam0x17/crystal-mongo-orm