From: Gavin_King/Cirrus%<CI...@ci...> - 2002-04-15 01:42:25
|
> I was able to figure out how to run FooBarTest. After setting the proper > "SelectMethod=cursor" parameter in the URL, I was able to run a large number > of the tests. Here are a couple of the issues I encountered: Sorry, I should have mentioned the SelectMethod=cursor bit. Its very important. > In testLoad there was a NPE, though the program kept running: Dont worry, the NPE is intended as a test. > In testQuery, there was this exception: > testQuery... > Exception in thread "main" java.lang.reflect.InvocationTargetException > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [snip] >I couldn't quite figure out what was underlying this issue. You'll note from >the "... 6 more" line that this was under JDK 1.4. It was with the 0.9.8 >release. Urrghhh thats an unhelpful looking stacktrace. I might mess with TestCase to unwrap the wrapped exception. Been meaning to do that for a while. Alternatively I could switch to JUnit which everyone else seems to be in favor of..... I have looked at this problem in the past but I forget exactly what the root cause was. I did verify that it was something I couldn't easily fix.... It would be very nice if we can establish exactly which subset of hibernate's functionality is working using the MS driver. It might turn out to be a large enough subset for some people's requirements. > A couple of other comments, most of which you probably know: > 1) The sybase dialect really isn't appropriate for SQL Server 2000. SS2K has > data types that a lot more directly map to the java.sql.Types (e.g. bit to > BIT, bigint to BIGINT, etc.). Thankyou for letting me know this. Would you like to write an MSSQLDialect for us? You seem to know the platform much better than me. > 2) In trying to workaround one problem, I had to change some hibernate code > (nothing permanent). The lack of a build facility meant I had to cobble > together a batch file to do that. A nice Ant script would be great (maybe I > missed something in the download). Try checking out the latest CVS. (There are also some improvements/fixes in there that I really should have released weeks ago - been so busy) > 3) This is more of a philosophical thing. I agree quite fully about the > reflection-based approach to mapping. However, I tend to think that the DB > should be the authority when it comes to the schema, not the app or a .xml > file. This is primarily because the things that one can specify about the > schema in, for example, Enterprise Manager start getting fairly > database-specific (constraints, triggers, etc.); and they aren't necessarily > important to represent in the .xml file. So I tend to start in the database > and try to take as much advantage as possible of its capabilities to > declaratively define the schema and the rules for enforcing data integrity. Can you give me a better idea of exactly how you would divide responsibility here. It sort of seems to me that _schemas_ are easy things to keep in the database but _mappings_ not so easy.... One intended approach is to define all schemas on the DB and use the mapping file as a map _only_. You dont need to use the schema generation tool. I'm very open to new ideas on all this.... > Another point is that writing bean-style property methods on a class is > excruciatingly tedious. Aaahhhh ... being an IDE-user I probably underestimate the pain in this for some people. You know, it would be about an hours work to let hibernate use also instance variables directly. Would anyone like this? > What I'm getting at is that I'd like to see a > generator facility to go from the schema to the .xml and from the .xml to > the skeleton of the bean classes. It wouldn't need to be a required > capability to use Hibernate, more of an optional facility like the current > schema generator. That would be nice. If anyone wants to contribute something like that we should certainly include it. > Just one man's opinion... Which is very welcome :) peace Gavin > -----Original Message----- > From: Gavin_King/Cirrus%CI...@ci... > [mailto:Gavin_King/Cirrus%CI...@ci...] > Sent: Saturday, April 13, 2002 9:12 PM > To: Donnie Hale > Cc: hib...@li... > Subject: RE: [Hibernate-devel] SQL Server 2000 questions > > > > > Don't know if/when you'll get this, but thought I'd send it while I go > off > > and look into things. > > > Are there instructions, or can you point me in the right direction, to > run > > the test suite against a particular JDBC driver / database? I > want to run > it > > against SQL Server 2K w/ the MS JDBC driver just to see what I discover. > > The class cirrus.hibernate.test.FooBarTest is executable. Run it with > "mssql" as a command line argument. > > Hope thats enough to get you started. Any problems let me know. > > peace > > Gavin > > |