Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Mark

2005-06-08
2013-04-25
  • Mark Nuttall
    Mark Nuttall
    2005-06-08

    It looks like it doesn't currently support Hibernate 3.0.

     
    • Mark Nuttall
      Mark Nuttall
      2005-06-08

      Well,
        I sort of got it working.  I get errors on different objects.  Like subclasses.

       
    • Rob Karatzas
      Rob Karatzas
      2005-06-09

      quickly looked at the project and came to the same conclusion.

      how did you get it to work with H3 at all? (copied Hibernate3.jar to lib, tried setting up project with my mappings, but I got a blow-up when it needed to track down the .dtd and we're proxied here at work).

      did you change anything in the source and did anyone from the project acknowledge any efforts to have it work with H3?

      rob

       
      • Mark Nuttall
        Mark Nuttall
        2005-06-10

        I pulled the project into Eclipse, removed the H2 specific jars and added the H3 specific ones (they require different jars).  Then I build the project and had to change a few classes to accomdate the H3 changes.  Not a whole lot.  Basically it is replacing imports.

        Another thing that caused me problems was that when it builds queries, it lower cases the field name. Like getType becomes type.  So I modified that code.to handle that (temporilty).  I could have changed all my .hbm.xml files.

         
    • Erik Swenson
      Erik Swenson
      2005-06-10

      I have not tested ObjectVisualizer with Hibernate 3 yet but I plan to add support to the next release. From what I have read Hibernate 2 and 3 are not source compatible, but they can co-exist in the same application so I will probably have to create a new plugin for Hibernate 3...

      - Erik

       
      • Rob Karatzas
        Rob Karatzas
        2005-06-10

        ok, let us know when you'd like us to give it a try.

        rob

         
    • Rob Karatzas
      Rob Karatzas
      2005-06-10

      thanks!

      Erik, do you want a hand at development & testing?  We have an extensive H3 environment for a big 3 (US) automotive company.

      Could probably/eventually pull this into (Oracle) TopLink (like H3) as well (if I can ever get out of perpetual firefighting ;)

      Rob
      tutor@ebiz-developer.com

       
    • Erik Swenson
      Erik Swenson
      2005-06-13

      I've created a plugin for Hibernate 3 and tested againt my sample project and it seems to work. I'm going to do some more testing and check it into CVS tomorrow.

      Mark: Can you give me an example of the field name problem you are having? What would you have had to change in your hbm.xml file? What code did you change?

      Rob: Thanks for the offer. I could definetly use some help testing and some feedback or suggestion on how to improve ObjectVisualizer.

      If either of you would like to test the H3 plugin would rather not get the code from CVS and compile. I can post a patch...

      - Erik

       
      • Rob Karatzas
        Rob Karatzas
        2005-06-17

        Sure, I can test the patch.

        If you don't want the whole world to know before it's ready, just send me an e-mail (tutor@ebiz-developer.com) with instructions and I'll give it a shot.

        Rob

         
    • Mark Nuttall
      Mark Nuttall
      2005-06-17

      Sorry Erik.  I forgot to check back.

      Lets say  have a presistant class with the accessor "getName".  The method  "getMethodPath" in class "MethodMetaData" will return "name".  In my .hbm.xml, the Property name is defined as "Name" because the access isn't field level. 

      I don't know why I used upper case. I think I thought I had too. :)  I probably should have used lower case.  The best solution would be to lowercase everything.  Of course that affects all my hql. 

       
    • Mark Nuttall
      Mark Nuttall
      2005-06-17

      Oh, this is what I added/changed in HibernatePlugin.parseFilter():

      String filterName = filter.getMethodMetaData().getMethodPath();
                 
                  StringTokenizer tokenizer = new StringTokenizer(filterName, ".");
                  StringBuffer buffer = new StringBuffer();
                  while (tokenizer.hasMoreTokens()) {
                      String token = tokenizer.nextToken();
                      buffer.append(token.substring(0,1).toUpperCase());
                      buffer.append(token.substring(1));
                      if(tokenizer.hasMoreElements()){
                          buffer.append(".");
                      }
                  }
                             
                  stringBuffer.append(NAME + "." + buffer.toString() + " ");

       
    • Erik Swenson
      Erik Swenson
      2005-06-22

      Rob,

      I'll put together a patch and send it to you...

      Thanks,
      Erik

       
      • Rob Karatzas
        Rob Karatzas
        2005-06-22

        sounds great and I'll give it a test drive...

        what's your recommendation on how I should obtain the patch?

        Rob