Jaime Garcia
Jaime Garcia

Reputation: 7096

Hibernate running random queries

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.

Upvotes: 0

Views: 678

Answers (1)

kem
kem

Reputation: 1127

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.

Upvotes: 1

Related Questions