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?
Asked
Active
Viewed 552 times
2
-
Is the Oracle tag appropriate? Are you unsure to of the command to set a column comment? – Stephanie Page Jan 25 '11 at 18:53
-
I'm not familiar with the Oracle tag, so I'm not sure if it's appropriate. Yes, I'm unsure of the command to set a column comment. Since I'm letting NHib generate the schema, I was hoping to automate that via the mapping. I just don't know how, or if it's possible. – nkirkes Jan 27 '11 at 21:36
1 Answers
2
Yes, you can use <database-object>
to add any additional artifacts (comments, indexes, triggers, etc) that you need.

Diego Mijelshon
- 52,548
- 16
- 116
- 154
-
I doesn't look like that tag is valid as part of a property element. I would imagine whatever trick I use will be best placed on each property in the mapping, since the comments are one-to-one for the mapped columns. Unless I'm totally missing something in the documentation. – nkirkes Jan 27 '11 at 21:38
-
They have to go separately (after the class element, for example) – Diego Mijelshon Jan 27 '11 at 22:27