As an OR/M Person...
I really should learn not to read blogs at 1AM, nevertheless...
Rob Conery (SubSonic) talks about why OR/M sucks:
Just to demonstrate:
1: [HasAndBelongsToMany(Table="UsersToRoles", ColumnKey ="`User`", ColumnRef = "Role")]
2: public ISet<Role> Users { get { ... } set { ... } }
I also get lovely relational DB as a side benefit, but that is beside the point. Rob brings the point about "what is a DB from OO point of view" which came out in the OR/M Smackdown, I will give the same answer that I did then, if the tools does that, feel free to shot the tool.
Rob, that sounds like a limitation of the tool, not the technology.
And my firstmost goal is rarely performance, actually, it is maintainability.
Ha? Didn't checked it, but it is something in the order of: "select thread.Name, count(thread.Replies), r.DatePublished, r.User.Name from Thread thread, Reply r where r.Id = (select max(r.Id) from Reply where r.Thread = thread)". Not really that much code at all, actually. Worst case scenario, I resort to something like this, which is still not a lot of code.

Comments
Comment preview