views:

31

answers:

0

Hello,

I am new to ORMs in general. I have a table (lets call it Entity) with columns --

  1. ID
  2. expression
  3. type ( can be 'long_word', 'short_word' or 'sentence' )

Often, the first two types occur in a 'sentence', so, I want to maintain another table which maps 'Sentences' to 'long_word' or 'short_word' using the 'ID' field.

All i need is another table with 2 'Integer fields' referring to 'ID' as a foreign key.

But, how do i do this in Elixir?

Edit : I was afraid it will come to this eventually. No sweat, SQLAlchemy is solid, it will be worth it in the long run. But i really wish Elixir had worked. Cant have everything the way you want.

Thanks a lot...