我已经在炼油厂CMS中创建一个HABTM关联,但它返回错误象下面这样: ActiveRecord::StatementInvalid: PG::UndefinedTable: ERROR: relation "refinery_georgiantoast_restaurant_wines" does not exist
LINE 5: WHERE a.attrelid = '"refine
我对类关系的概念很陌生,并且编写了一个程序来测试它。但是,它给了我一些错误。 有5个头文件用于大学,部门,教师,学生和课程以及涉及的.cpp文件。我已经实现成分大学和部门以及部门和学生,教师之间的双向关联之间,当然 uni.h #pragma once
//#include"dept.h"
class University
{
public:
University(string,
这里是两个表properties和property_images我想关联这两个表。 性质 id
name
status
other-columns-here
property_images id
property_id
image
status
这里是码 - class Property < ActiveRecord::Base
has_many :property_
所以我看到这个奇怪的错误,当我尝试做一个相当简单的交互式测试我添加的关联。这里有两种型号: class Lot < ActiveRecord::Base
has_many :graves
belongs_to :block
end
class Grave < ActiveRecord::Base
belongs_to :lot
end
下面是创建表的迁移: