Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

9
  • 1
    It should be noted that, in lots of ORMs (at least every one that I've used), you can write and execute raw SQL. Therefore, if the ORM does not satisfy some constraint well, you can always resort to doing it with native SQL, while simultaneously reducing the 'boilerplate' operations of SELECT * FROM some_table WHERE x = whatever that are extremely common. Hierarchical structures are handled well in some ORMs, and terribly in others, so this type of consideration should be researched before deciding to forgo ORMs entirely. Commented Mar 9, 2017 at 17:42
  • you can usually do this, but it doesnt always work the way you want it to! recently had this exact problem with nHibernate and nullable field mapping Commented Mar 9, 2017 at 17:45
  • I've never used nHibernate, but I have used some such as Rails' ActiveRecord, OrmLite (Java), and ActiveJdbc (Java). Each of these handles executing raw SQL differently, e.g. ActiveRecord makes it really easy, and OrmLite made it really difficult. ActiveRecord has been in development for years and years, so surely that has something to do with it. All these little nuances are part of feasibility testing, but sometimes you miss the little things that come back to bite you later... Commented Mar 9, 2017 at 17:48
  • yeah, thats why i say put a wrapper around it. you can still use the orm, but youre not locked in if lets you down in some way Commented Mar 9, 2017 at 17:50
  • Saving(tm) - I chuckled a bit at this. Commented Mar 9, 2017 at 19:18