# How to access Property Metadata Information?

**URL:** <https://discourse.hibernate.org/t/how-to-access-property-metadata-information/9225>\
**Category:** Hibernate ORM\
**Created:** [March 19, 2024, 4:42pm UTC](https://discourse.hibernate.org/t/how-to-access-property-metadata-information/9225 "2024-03-19T16:42:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![akshitagarwal](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/akshitagarwal/32/2266_2.png) [@akshitagarwal](https://discourse.hibernate.org/u/akshitagarwal)\
**Post date:** [March 19, 2024, 4:42pm UTC](https://discourse.hibernate.org/t/how-to-access-property-metadata-information/9225/1 "2024-03-19T16:42:02Z")

</div>

We are undergoing HBM XML to Annotation Migration and have written a program to compare all the Metadata properties between HBM and Annotation.

Basically we are creating 2 SessionFactory one with HBM and another with annotation and then extracting ClassMetadata to compare the EntityMetamodel. This gives us a lot of information like Property Names, Types, Versionability and lot of other fields.

But we are not able to get some information like propertyAccessorName, AccessType (Field/ Property).

Do you suggest any other way by which we can compare these fields as well?

---

<div class="post-metadata">

**Author:** ![beikov](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/beikov/32/258_2.png) [@beikov](https://discourse.hibernate.org/u/beikov)\
**Post date:** [March 20, 2024, 2:33pm UTC](https://discourse.hibernate.org/t/how-to-access-property-metadata-information/9225/2 "2024-03-20T14:33:55Z")

</div>

I would suggest you to compare the boot model i.e. `PersistentClass`, `Property`, `Value` etc.  
This should contain all of the necessary bits and pieces.

---

<div class="post-metadata">

**Author:** ![akshitagarwal](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/akshitagarwal/32/2266_2.png) [@akshitagarwal](https://discourse.hibernate.org/u/akshitagarwal)\
**Post date:** [March 21, 2024, 6:10am UTC](https://discourse.hibernate.org/t/how-to-access-property-metadata-information/9225/3 "2024-03-21T06:10:20Z")

</div>

@beikov How can we access PersistentClass in Hibernate 5.6?

---

<div class="post-metadata">

**Author:** ![beikov](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/beikov/32/258_2.png) [@beikov](https://discourse.hibernate.org/u/beikov)\
**Post date:** [March 25, 2024, 12:59pm UTC](https://discourse.hibernate.org/t/how-to-access-property-metadata-information/9225/4 "2024-03-25T12:59:23Z")

</div>

Through e.g. an `Integrator`, which can access the boot information through the `Metadata`.
