Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. COI'm not sure what your point is. My ORM is less of a problem than my RDBMS. I can obviously bypass any part of the abstraction layer easily except SQL (as Joel observes), but even if I could put inline assembly language in my SQL statements, that wouldn't be the *right* answer here. MySQL 5.5 is significantly worse than MySQL 5.1 (and 5.0 and Postgres and everything else I've tried) in some obvious cases, and "stay with an old version" is a very easy solution. Did you have a better answer here?
      singulars
    2. COI first answered your question assuming it was described in the title; when in fact your question is not about mysql (the answer being to leave "DISTINCT" out of your query) where the real problem seems to be NHibernate. But if it has an exit to direct SQL insertion, why not just use it? Ultimately NHibernate is going to need to adapt to MySQL and not vice versa. In your context SQL insertion would be the equivalent of assembly insertion. Maybe for you staying with an old version is preferable, dunno. YMMV. But it's not like MySQL is doing something illegitimate.
      singulars
    3. COI don't know why you say it's "not about mysql". It's absolutely about MySQL, with the requirement that I can't modify the query arbitrarily. Obviously the question is not simply "how many records are in this table?", since even at 90 seconds that's far less time than I spent typing this question. My system builds arbitrary queries where sometimes DISTINCT is necessary, and the easiest place to recognize this is in MySQL, and in fact MySQL up to 5.1 seemed to do exactly this.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload