Hacker News new | past | comments | ask | show | jobs | submit login

Some years ago Entity Framework followed navigational properties (foreign keys) by default, which quickly escalates. The scenario could be a user table referencing a organisation table, so that when quering for an org, you’d get every user.

Fell into this one personally, it sucked!




I dont think EF ever did that. However, if you used automatic lazy loading and you somehow inadvertently referenced the collection, then yes, it would lazy load the related entities.


This must be a mistake that you do once as a junior and then never repeat. When you declare a field with collection, would not it be natural to ask how it works?


Definitely! The problem though, is that this issue creeps up on you over time, and maybe only i production, because the performance is directly correlated to the amount of data in the database.

But I guess issues like these are what transition you from junior developer into whatever comes next.


Exactly, nobody bothers checking what kind of queries the ORM produces. The stuff works on dev (with 1% of the data prod has) and they get merged.

Then it goes to production and everything grounds to a halt because some bit in there fetches a 100M row table that was 10k rows in dev.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: