Cannot define multiple columns within the same table that have the same relationship to another table #251
Replies: 5 comments
-
Hi there, welcome! The codegen is a little dumb now indeed. Basically, it can't be done with sea-orm/src/tests_cfg/entity_linked.rs Lines 4 to 17 in a6dfb41 Lines 286 to 301 in a6dfb41 See also #89. Oh btw, is that a Battleship game? |
Beta Was this translation helpful? Give feedback.
-
Did that help? |
Beta Was this translation helpful? Give feedback.
-
Sorry for the delayed reply, been a bit busy lately to work on side projects. It looks like exactly what I'm looking for, and I'll give it a shot once I get a chance to work on this (hopefully in the next few days.) Its a PVP statistics tracking system for the MMO Eve online. Thanks for the help! |
Beta Was this translation helpful? Give feedback.
-
@tyt2y3 I think you should make it bold and very clear somewhere in the documentation: |
Beta Was this translation helpful? Give feedback.
-
sorry any examples of how this was done, i have a situation where i have 2 columns in one table with a relationship to another, unsure how i define the relationship/link in this case also how would i define which column it is on |
Beta Was this translation helpful? Give feedback.
-
Hey there, currently migrating one of my projects over from Diesel to take advantage of tokio and I'm running into a problem with one of my tables.
Here is the table in question:
(Irrelevant columns omitted for brevity)
The generated
attackers.rs
entity is generated as so:This looks correct, but EsiTypes is defined twice in the enum which is of course not possible.
As expected, the related implementation for the other table type is also duplicated:
I dug around in the API docs a bit, but I can't seem to find a way to make this schema work. Is there a mechanism to allow this in sea_orm?
Beta Was this translation helpful? Give feedback.
All reactions