Oracle Sequences + NHibernate

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
Posts: 1
Joined: Tue 26 Jun 2012 21:31

Oracle Sequences + NHibernate

Post by jstrickland » Tue 26 Jun 2012 21:39

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?

Site Admin
Posts: 8245
Joined: Thu 14 Aug 2008 12:44

Re: Oracle Sequences + NHibernate

Post by Shalex » Tue 03 Jul 2012 13:30

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.

Post Reply