Multiple foreign keys to same table using Elixir
Posted
by Suvir
on Stack Overflow
See other posts from Stack Overflow
or by Suvir
Published on 2010-04-09T07:11:22Z
Indexed on
2010/04/09
7:13 UTC
Read the original article
Hit count: 396
Hello,
I am new to ORMs in general. I have a table (lets call it Entity) with columns --
- ID
- expression
- 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?
Thanks a lot...
© Stack Overflow or respective owner