Page 1 of 1

Oracle Sequences + NHibernate

Posted: Tue 26 Jun 2012 21:39
by jstrickland
I'm using Entity Developer to take an existing database in Oracle 11G and turn it into a model. I would like to make all of my primary keys ( Number(20,0) ) generate from sequences. I'd also like each one to have it's own sequence. I don't see any method to make this happen automatically and I don't see a way to define the sequence per entity in the model itself.

What am I missing and where do I find the appropriate fields in the model?

Re: Oracle Sequences + NHibernate

Posted: Tue 03 Jul 2012 13:30
by Shalex
Entity Developer doesn't include functionality to generate sequences/triggers for primary keys. But you can use NHibernate's Identity Generator:
  • right click on the diagram > Model Settings > General > Default Identity Generator
  • select a particular property on the diagram and set its Generator via Properties window
Identity Generator's values are described in the documenation: NHibernate > Reference > Dialog Windows > Model Settings.