Search code examples
oraclenhibernateschema-migration

Setting Oracle's Column COMMENTS Attribute with NHibernate


One of my larger applications is using NHibernate over an Oracle data store. For testing/development, the application uses NHibernate's schema generation to create/re-create the database when needed. Prior to delivery, one of the things being asked of us by the DBAs is to include Comments for each field in the database (there are a lot). I'm looking for solutions that would let me specify the comment in the mapping file. Has anyone done anything like this? Would NHibernate support this activity with a little effort on my end?


Solution

  • Yes, you can use <database-object> to add any additional artifacts (comments, indexes, triggers, etc) that you need.

    See 5.6. Auxiliary Database Objects