Browsed by
Tag: hbm

Getting Table Names from Hibernate’s .hbm files

Getting Table Names from Hibernate’s .hbm files

I ran into a situation recently wherein I needed to go through a bunch of Hibernate config files to find out which tables were currently mapped. I’d guess that there are tools that could to this – but using a Linux one-liner is always more fun. grep -e ‘table=”*”‘ *.xml | sed -e “s/^.*table=”//” | cut -f1 -d”” Enjoy!