Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.2.4] embed_in not working with latest version? #54

Closed
OliPelz opened this issue Jan 20, 2015 · 4 comments
Closed

[1.2.4] embed_in not working with latest version? #54

OliPelz opened this issue Jan 20, 2015 · 4 comments

Comments

@OliPelz
Copy link

OliPelz commented Jan 20, 2015

Dear maintainers,

I have problems embedding some tables, I have tried all kinds of things but cannot get embedding to work.

My code looks as follows:

table "tmpPhenotypeExperiment", :rename_to => 'phenotypeExperiment' do
   column "id", :key
   column "blabla", :integer
   column "blubb", :string
end


table "tmpExperiment2",                                       
      :embed_in => 'phenotypeExperiment',                               
      :on => 'phenotypeExperiment_id',                                  
      :as => 'object'

when I run the mongify "process" task it creates the phenotypeExperiment correctly but is not embedding anything :(. It just creates the tmpPhenotypeExperiment table.

here is my mysql create table statements:

CREATE TABLE `tmpPhenotypeExperiment` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
  `blabla` bigint(20) DEFAULT NULL,
  `blubb` longtext COLLATE utf8_unicode_ci,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2528 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci |

and

CREATE TABLE `tmpExperiment2` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
...[some fields here]...
 `phenotypeExperiment_id` bigint(20) DEFAULT NULL)

On mysql I can do a join and get results:

select * from tmpExperiment2 A inner join tmpPhenotypeExperiment B on A.phenotypeExperiment_id = B.id;

is embedding broken in the latest version?

@OliPelz
Copy link
Author

OliPelz commented Jan 20, 2015

I use mongify 1.2.4 on Mac Os X 10.9 with a remote mysql server connection version 5.1.73-1

@anlek
Copy link
Owner

anlek commented Jan 20, 2015

Hmm, that's odd.
It's hard to say what it doesn't work. Try to referencing the old name: tmpPhenotypeExperiment.

table "tmpExperiment2",                                       
      :embed_in => 'tmpPhenotypeExperiment',                               
      :on => 'phenotypeExperiment_id',                                  
      :as => 'object'

Also try doing it as: "Array"
Let me know if that works. (it really shouldn't but just to make sure).

@OliPelz
Copy link
Author

OliPelz commented Jan 21, 2015

in the end I found out it worked but there were only few records in a very big table were connection was possible and I checked by eye and overlooked them :(. Sorry that I may caused you some work here.
Please close this ticket.

Best,
Oli

BTW: thank you for all your hard work you put into this wonderful tool

@anlek
Copy link
Owner

anlek commented Jan 21, 2015

I'm glad you figured it out and thank you for taking the time to reporting it!

I'm happy you got good use out of Mongify! Feel free to spread the word.

@anlek anlek closed this as completed Jan 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants