anlek/mongify

Embed_in doesn't work

Closed this issue · 1 comments

Hi,

In this test, I'm trying embed lu_project and lu_owner into lu_object table with following translation.rb but it never succeeded. The process run fine without any error msg and I just couldn't get the embedded structure. Can you please advise what could be wrong in the translation.rb file.

Regards!

table "lu_object" do
column "object_id", :integer
column "object_guid", :string
column "object_name", :string
column "object_desc", :string
column "object_location", :string
column "creation_date", :date
column "modification_date", :date
column "creation_timestamp", :datetime
column "modification_timestamp", :datetime
column "project_id", :integer
column "owner_id", :integer
column "object_status_id", :integer
column "object_type_id", :integer
column "object_category_id", :integer
end

table "lu_project" ,:embed_in => :"lu_object", :on => :project_id do
column "project_id", :integer
column "project_guid", :string
column "project_name", :string
column "project_desc", :string
column "creation_timestamp", :datetime
column "modification_timestamp", :datetime
column "project_status", :string
column "metadata_id", :integer
end

table "lu_owner" ,:embed_in => :"lu_object", :on => :owner_id do
column "owner_id", :integer
column "owner_guid", :string
column "owner_name", :string
column "owner_login", :string
column "creation_timestamp", :datetime
column "modification_timestamp", :datetime
column "owner_status", :string
end

anlek commented

Hello @jcheng418, your key columns must be setup for Mongify to know which columns are primary keys. Please see the docs in regards to column types