Having searched through the source, I found what I was looking for but it wasn't available through any public api calls.
So I have to come clean, and admit I changed the source to get what I wanted.
I modified
Code:
org.hibernate.metadata.ClassMetadata
by adding
Code:
public EntityMetamodel getEntityMetamodel();
and then modified
Code:
org.hibernate.persister.entity.AbstractEntityPersister
by making the following method public
Code:
public EntityMetamodel getEntityMetamodel()
So now I can do the following
Code:
EntityMetamodel meta = getSessionFactory().getClassMetadata(entity.getClass()).getEntityMetamodel();
and use it to get the mapping meta properties by
Code:
StandardProperty[] props = meta.getProperties();
which in turn gives me the CascadeStyle for each StandardProperty which has a method
Code:
hasOrphanDelete()
which tells me what I needed to know.
Not ideal I admit, but I'm not sure what other way I could find it out.
John