The current table-level embed_in implementation requires the child to reference the parent by id... but there seems to be no way to embed if the parent references the child...
For example, the following will create a reference to an address (child) within "companies" (parent):
table "addresses" do
column "address1", :string
column "address2", :string
column "suite", :string
column "city", :string
column "province", :string
column "country", :string
column "phone", :string
column "zip", :string
column "created", :datetime
column "modified", :datetime
column "id", :key, :as => :integer
end
table "companies" do
column "title", :string
column "description", :string
column "email", :string
column "website", :string
column "organizationType", :integer
column "addressId", :integer, :references => :addresses
column "created", :datetime
column "modified", :datetime
column "id", :key, :as => :integer
end
... BUT I want to embed the address record in companies... companies has a reference to address only.
Is it possible for Mongify to embed by reference... ?
For example, it would be great if I could do this on the column level:
column "addressId", :integer, :references => :addresses, embed_in=>true
... or maybe there is a way of doing this that I don't understand?
The current table-level embed_in implementation requires the child to reference the parent by id... but there seems to be no way to embed if the parent references the child...
For example, the following will create a reference to an address (child) within "companies" (parent):
... BUT I want to embed the address record in companies... companies has a reference to address only.
Is it possible for Mongify to embed by reference... ?
For example, it would be great if I could do this on the column level:
column "addressId", :integer, :references => :addresses, embed_in=>true... or maybe there is a way of doing this that I don't understand?