From: Doug C. <de...@fl...> - 2002-02-24 19:29:50
|
> I released a new version. Thank you, Gavin. It looks good. I ran the tests with Mckoi and encountered a few problems. The first couple were clearly Mckoi specific issues: - "count" cannot be used as a column name - quoted '\n' gives the parser fits in a query string One problem, though, led me to wonder about Hibernate's behavior; in testQuery the test: from bar in class cirrus.hibernate.test.Bar where bar.baz.count=666 leads to the SQL: SELECT DISTINCT baz1.idcode as idcode0, bar.foo_id as foo_id1, baz1.counte as counte0, baz1.name as name0, baz1.stringSet as stringSet0, baz1.stringDateMap as stringDateMap0, baz1.fooArray as fooArray0, baz1.stringArray as stringArray0, baz1.setArray as setArray0, baz1.stringArrayMap as stringArrayMap0, baz1.setList as setList0, baz1.customs as customs0, bar.class as class1, bar.baz as baz1, bar.bar_string as bar_string1, bar.bar_count as bar_count1, bar.name as name1, bar.importantDates as importantDates1, bar.the_time as the_time1, bar.foo as foo1, bar.long_ as long_1, bar.integer_ as integer_1, bar.float_ as float_1, bar.double_ as double_1, bar.bytes as bytes1, bar.date_ as date_1, bar.timestamp_ as timestamp_1, bar.boolean_ as boolean_1, bar.bool_ as bool_1, bar.null_ as null_1, bar.short_ as short_1, bar.zero_ as zero_1, bar.int_ as int_1, bar.string_ as string_1, bar.byte_ as byte_1, bar.yesno as yesno1, bar.blobb_ as blobb_1, bar.nullBlob as nullBlob1, bar.status_ as status_1, bar.bin_ as bin_1, bar.first_name as first_name1, bar.surname as surname1, bar.count_ as count_1, bar.name_ as name_1, bar.subcount as subcount1, bar.subname as subname1 FROM Baz baz1, foos bar WHERE 1=1 and bar.class in ('cirrus.hibernate.test.Bar') AND ( ( baz1.counte=666 and bar.baz = baz1.idcode ) ) => com.mckoi.database.jdbc.MSQLException: Can not order by field type VARBINARY in 'bin_' I wonder why DISTINCT is used here even though the class Foo (Bar's superclass) is configured as select="all"; I even tried setting Bar's select mode explicitly to ALL, and still got DISTINCT. It was only after setting Baz's mode to ALL that I got it to work. Anyway, I reported all three problems to to...@mc.... e |