Open Bludwarf opened 9 years ago
Hi team,
When using an SQL field nammed "type" and using it as "type" and not "type_id" orm throws the error : TypeError: Cannot read property 'isInstance' of null.
TypeError: Cannot read property 'isInstance' of null
Here is the model definition using Express.
// use "lien.type" instead of "lien.type_id" db.settings.set("properties.association_key", "{name}"); // lientype models.lientype = db.define("lientype", { name: String }); // lien models.lien = db.define("lien", { title: String, url: String }); models.lien.hasOne('type', models.lientype);
Thank you for your great work guys.
Where's your definition of the type table?
type
Hi dxg, There is no type table but only lientype table referenced by lien table. Am I missing something with the syntax ?
lientype
lien
Hi team,
When using an SQL field nammed "type" and using it as "type" and not "type_id" orm throws the error :
TypeError: Cannot read property 'isInstance' of null
.Here is the model definition using Express.
Thank you for your great work guys.