<div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I have another question. The particular bug I wrote a patch for only<br>
comes up with MySQL. Is there some way to test hibernate against<br>
</blockquote>
<br></div>
Yes. On Hibernate Core, you can override the appliesTo(Dialect) method and return "true" for MySQL-based dialects and false for the others.</blockquote><div><br>If I wanted to write a test that ensured that transactions aren't accidentally committed during a polymorphic delete when a database constraint is violated, where would I put it? org.hibernate.test.ops.DeleteTest has a number of tests relating to the delete operation but none of the mappings in the org.hibernate.test.ops package have any joined-subclasses in them.<br>
<br>I've attached a diagram of the schema I'd create. My test would:<br><br>1. Create a Child and a KeyHolder with a reference to it<br>2. Commit<br>3. Delete the Child<br>4. Catch the expected constraint exception and fail if no exception was thrown<br>
5. Query for the Child and ensure that its type is still Child and not Parent<br><br>Step 5 would fail for MySQL with InnoDB at this point.<br><br>I think if I did override appliesTo(Dialect) it would be to make sure that foreign key constraints and temp tables work for that dialect. I know MyISAM doesn't support foreign key constraints and polymorphic deletes aren't supported for Dialects that don't support temp tables.<br>
<br><br>Also I ended up testing Hibernate against mysql by:<br>1. Adding a mysql5 profile to my ~/.m2/settings.xml which overrides jdbc.url, jdbc.user, and jdbc.pass<br>2. JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun/ mvn -P mysql5 clean test<br>
<br>That seemed to do the trick. It looks like the same tests fail for mysql as for the rest of HSQLDB but I didn't do a very thorough check.<br><br>Is there a web page with stuff like this? Its not super hard to figure out, but it would be nice to spell it out explicitly.<br>
<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
MySQL? Just out of curiosity, is there a build farm for hibernate that<br>
covers all of the different databases like Postgres has for operating<br>
systems at <a href="http://buildfarm.postgresql.org/cgi-bin/show_status.pl" target="_blank">http://buildfarm.postgresql.org/cgi-bin/show_status.pl</a> ?<br>
</blockquote>
<br></div>
There is a public Hudson (CI software) instance [1] which should receive some attention in the next months. You may want to check the job "hibernate-all-trunk" and ignore the others. Also, note that this includes most Hibernate projects (ANN/EM/Validator/Search/Validator/...), not only Core.<br>
<br>
[1] <a href="http://hudson.jboss.org/hudson/view/hibernate/" target="_blank">http://hudson.jboss.org/hudson/view/hibernate/</a><br>
</blockquote><div><br>Neat. Its not quite as easy to see what is going on compared to the Postgres one but its a good start.<br></div></div>