[hibernate-dev] Where is annotation <-> column name mapped?

Emmanuel Bernard emmanuel at hibernate.org
Wed Dec 7 03:46:58 EST 2011


Hi Pawel,

Check out the AbstractEntityPersister constructor and it's use of PersistentClass

    persistentClass.getIdentifier().getColumnIterator();

And for regular properties

    persistentClass.getPropertyClosureIterator();
    property.getColumnIterator();

SingleTableEntityPersister has specific code wrt discriminator column


On 7 déc. 2011, at 01:07, Paweł Stawicki wrote:

> Hello,
> 
> I'm trying to fix some bug on Hibernate
> (https://hibernate.onjira.com/browse/HHH-6580), and I need to get
> following information:
> 1. Which property is an entity ID?
> 2. Which column name in table corresponds to this property?
> 
> What class/object has this information?
> 
> I spent few hours on it, but I can't tie it all together. Maybe some
> documentation would help? I found that
> EntityMetamodel.getIdentifierProperty can give me answer to question
> 1, but I can't find answer for question 2.
> 
> Best regards
> --
> Paweł Stawicki
> http://pawelstawicki.blogspot.com
> http://szczecin.jug.pl
> 
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev





More information about the hibernate-dev mailing list