❔ Ef core-Odd Behavior
So straight into it,
The mapping:
builder.Entity<LessonPhase>(b =>
{
b.ToTable(lingumindConsts.DbTablePrefix + "Phases", lingumindConsts.DbSchema);
b.HasOne(x => x.BotInitialInteraction).WithOne(x => x.LessonPhaseForInitial)
.HasForeignKey<BotInteraction>(x => x.LessonPhaseForInitialId);
b.HasOne(x => x.BotFinalInteractionOnSuccess).WithOne(x => x.LessonPhaseForOnSuccess)
.HasForeignKey<BotInteraction>(x => x.LessonPhaseForOnSuccessId);
b.HasOne(x => x.BotFinalInteractionOnFailure).WithOne(x => x.LessonPhaseForOnFailure)
.HasForeignKey<BotInteraction>(x => x.LessonPhaseForOnFailureId);
b.HasMany(x => x.UserInteractions).WithOne(x => x.LessonPhase).HasForeignKey(x => x.LessonPhaseId);
});
The Class:
The Code:
Basically After saving to the DB, the last phase, lets say number 6, The InitialBotInteraction string value becomes the same as the BotFinalInteractionOnSuccess string,
Only happens on the last phase all the others are fine, so the heck is going on?
16 Replies
Removed alot of code cuz it wont hit let me pass the 2000 character mark
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
If your code is too long, you can post to https://paste.mod.gg/ and copy the link into chat for others to see your shared code!
@TeBeClone alright here it is:
https://paste.mod.gg/pnakwgkdnmti/0
BlazeBin - pnakwgkdnmti
A tool for sharing your source code with the world!
again , only happening on the last element in the phase list, like the fuck lol
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Will post there aswell, last time didnt help me too much out there tho =[
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Yeah bro lol ik nobody owns me anything neither its fine
ef core bugs annoying af 😄
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
what is the issue?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
me neither
what's a "phase"?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
and dumping a ton of code on us doesn't help
I'm just not going to read it
if it's too big to fit here, you haven't refined your understanding of the problem enough
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.