Strangeness with Hibernate?

Help
David Hay
2009-01-05
2013-04-25
  • David Hay

    David Hay - 2009-01-05

    Hi,

    I'm new to P6Spy, and trying to use it with Hibernate.

    However, I'm only seeing single P6Spy log statements for multiple Hibernate sql statements.  Is there some config property I"m missing?

    Here's an example - 2 identical hibernate inserts (with different params), but only one P6Spy statement:

    8000 [main] DEBUG org.hibernate.SQL  - insert into t_setting (id, fk_to_settingdefinition, source, value, hId) values (?, ?, ?, ?, ?)
    8000 [main] TRACE org.hibernate.type.StringType  - binding 'RssUrl' to parameter: 1
    8000 [main] TRACE org.hibernate.type.LongType  - binding '157' to parameter: 2
    8016 [main] DEBUG org.hibernate.type.EnumType  - Binding '2' to parameter: 3
    8016 [main] TRACE org.hibernate.type.StringType  - binding null to parameter: 4
    8016 [main] TRACE org.hibernate.type.LongType  - binding '162' to parameter: 5
    8016 [main] DEBUG org.hibernate.SQL  - insert into t_setting (id, fk_to_settingdefinition, source, value, hId) values (?, ?, ?, ?, ?)
    Hibernate: insert into t_setting (id, fk_to_settingdefinition, source, value, hId) values (?, ?, ?, ?, ?)
    8016 [main] TRACE org.hibernate.type.StringType  - binding 'imageHoldInterval' to parameter: 1
    8016 [main] TRACE org.hibernate.type.LongType  - binding '158' to parameter: 2
    8016 [main] DEBUG org.hibernate.type.EnumType  - Binding '2' to parameter: 3
    8016 [main] TRACE org.hibernate.type.StringType  - binding '2' to parameter: 4
    8016 [main] TRACE org.hibernate.type.LongType  - binding '163' to parameter: 5
    1231187068328|16|3|statement|insert into t_setting (id, fk_to_settingdefinition, source, value, hId) values (?, ?, ?, ?, ?)|insert into t_setting (id, fk_to_settingdefinition, source, value, hId) values ('imageHoldInterval', 158, '2', '2', 163)

    thanks,

    David

     
    • Pat

      Pat - 2009-03-13

      hibernate does batch updates ( that may be the cause -- don't know for certain ) working on reviving this project.

      let me know if you have more information / patch ( look in svn repo )

       
  • Pat

    Pat - 2010-12-29

    Hi there -

    Sorry for the late response. I think I am the only one who has recently done anything with p6spy. I got some basic access to this project from the only original developer I could reach. Unfortunately, not full project admin access. So I have moved over to github for further development.

    You are welcome to help out there by forking and then sending me a pull request.

    Further development at : https://github.com/patmoore/p6spy

     

Log in to post a comment.