# How to fetch a @Transient property from the database using JPA and Hibernate?

**URL:** <https://discourse.hibernate.org/t/how-to-fetch-a-transient-property-from-the-database-using-jpa-and-hibernate/1160>\
**Category:** Hibernate ORM\
**Created:** [August 2, 2018, 6:37pm UTC](https://discourse.hibernate.org/t/how-to-fetch-a-transient-property-from-the-database-using-jpa-and-hibernate/1160 "2018-08-02T18:37:25Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [August 7, 2018, 9:08am UTC](https://discourse.hibernate.org/t/how-to-fetch-a-transient-property-from-the-database-using-jpa-and-hibernate/1160/2 "2018-08-07T09:08:07Z")

</div>

You have multiple options:

1. You can use the `@Generated` annotation as explained in [this article](https://vladmihalcea.com/how-to-map-calculated-properties-with-hibernate-generated-annotation/).
2. You can use the `@Formula` annotation as explained in [this article](https://vladmihalcea.com/how-to-map-calculated-properties-with-jpa-and-hibernate-formula-annotation/).

---

_[View the full topic](https://discourse.hibernate.org/t/how-to-fetch-a-transient-property-from-the-database-using-jpa-and-hibernate/1160)._
