ErlyORM / boss_db

BossDB: a sharded, caching, pooling, evented ORM for Erlang
Other
277 stars 138 forks source link

Problem with Postgres and has many #166

Closed davidw closed 10 years ago

davidw commented 10 years ago

The many argument below looks to be suspect.

I get this when trying to do Student:exams().

** exception exit: {{function_clause,
                        [{boss_db_adapter_pgsql,find,
                             [<0.2332.0>,exam,
                              [{student_id,equals,
                                   "student-f8397599-877b-4cae-878f-3337af322908"}],
                              many,0,id,ascending],

I am not sure - this may be related to trying to use uuid's as foreign keys. bisecting gets me down to these, but without a precise one because they don't compile:

37d5b40ab3de5a87204a6bc5f73317d2277647ce 33e3fd7914d69c24d5e67efe86426c51c12a51ce f936ce8c67682f657f075b29ec20b9dfcfa969b1 fe2dec2ad09089e5be11118c05cc6cfe32ff22c4

davidw commented 10 years ago

Commit fe2dec2ad09089e5be11118c05cc6cfe32ff22c4 did this:

-has_many_forms(HasMany, ModuleName, many, Opts) ->
-    has_many_forms(HasMany, ModuleName, all, Opts);
+%% has_many_forms(HasMany, ModuleName, many, Opts) ->
+%%     has_many_forms(HasMany, ModuleName, all, Opts);

Which kills has many relations.

zkessin commented 10 years ago

closed as per the pull req #167