# Should I use an application-generated entity identifier or use the database native generator with Hibernate?

**URL:** <https://discourse.hibernate.org/t/should-i-use-an-application-generated-entity-identifier-or-use-the-database-native-generator-with-hibernate/1493>\
**Category:** Hibernate ORM\
**Created:** [October 6, 2018, 1:06pm UTC](https://discourse.hibernate.org/t/should-i-use-an-application-generated-entity-identifier-or-use-the-database-native-generator-with-hibernate/1493 "2018-10-06T13:06:01Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![vlad](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/vlad/32/658_2.png) [@vlad](https://discourse.hibernate.org/u/vlad)\
**Post date:** [October 22, 2018, 7:37am UTC](https://discourse.hibernate.org/t/should-i-use-an-application-generated-entity-identifier-or-use-the-database-native-generator-with-hibernate/1493/12 "2018-10-22T07:37:02Z")

</div>

You can do that, but it won’t show you bind parameters or hint you that you are actually using logging.

Better use [`datasource-proxy`](https://github.com/ttddyy/datasource-proxy), as explained in [this article](https://vladmihalcea.com/the-best-way-to-log-jdbc-statements/).

---

_[View the full topic](https://discourse.hibernate.org/t/should-i-use-an-application-generated-entity-identifier-or-use-the-database-native-generator-with-hibernate/1493)._
