tags:

views:

77

answers:

1

All, when I first call buildSessionFactory, Hibernate seems to be running a bunch of queries on my DB. They vary from being "selects" to "insert"s. Why is this and how can I stop it?

Edit: After some review, no the queries are not random. They seem to be inserts, selects and deletes into the tables on my DB. It almost looks like Hibernate is inserting a few records, running selects to make sure they were inserted and then deleting them.

+1  A: 

When the session manager starts it generates and caches a standard set of CRUD queries for the mapped objects. What you're seeing is (probably) just the logging of this query generation activity.

kem
Is there any way to disable these? Or should I really care?
ferrari fan