Josh,
Yes, you can use the Native generator when mapping the Id column.
Id(i => i.Id, m => m.Generator(Generators.Native, g => g.Params(new { sequence
= "oracle_sequence" })));
In my case, I've been using Oracle in production and SqlCompact in
development/test environment without problems.
--
Fabiano França
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
On Saturday, October 6, 2012 at 4:58 AM, Oskar Berggren wrote:
> Maybe I'm missing the point but it sounds like a job for the "native"
> sequence handler, or maybe even better, the SequenceStyleGenerator which will
> use sequences if available but otherwise automatically fall back to maintain
> a sequence like structure in a regular table and also has the benefit of
> giving NHibernate control of the ID generation.
>
> /Oskar
>
>
> 2012/10/5 Josh Robinson <[email protected]
> (mailto:[email protected])>
> > Cory, your post seems as though it's been copied to 6 different places I
> > can find.. all of which have no answer.
> >
> > Have you found a way to abstract off the sequences or bury them in a
> > function call that can be replaced by a unit test construction?
> >
> > Does anyone else have any good ideas here? Maybe an interface that can be
> > implemented and added to config?
> >
> > Thanks folks,
> > Josh
> >
> > On Monday, May 17, 2010 10:24:52 AM UTC-4, Corey Coogan wrote:
> > > Hi gang,
> > > I'm using Oracle 10g and I'm working on getting DBA's to move
> > > away from composite keys to surrogate keys. They have started the
> > > migration on a few tables for me, but I've since learned during
> > > development that the sequences are causing problems in SQLite.
> > >
> > > I typically use SQL Server and the identity columns are no issue, but
> > > SQLite doesn't know what to do with a sequence type. I would really
> > > like to use SQLite to test my mappings, queries, etc.
> > >
> > > Is there anyway to abstract this type of ID generator from an Oracle
> > > Sequence?
> > >
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > > "nhusers" group.
> > > To post to this group, send email to [email protected].
> > > To unsubscribe from this group, send email to
> > > [email protected].
> > > For more options, visit this group at
> > > http://groups.google.com/group/nhusers?hl=en.
> > >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "nhusers" group.
> > To view this discussion on the web visit
> > https://groups.google.com/d/msg/nhusers/-/ArN2Z8X-f5MJ.
> > To post to this group, send email to [email protected]
> > (mailto:[email protected]).
> > To unsubscribe from this group, send email to
> > [email protected]
> > (mailto:nhusers%[email protected]).
> > For more options, visit this group at
> > http://groups.google.com/group/nhusers?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "nhusers" group.
> To post to this group, send email to [email protected]
> (mailto:[email protected]).
> To unsubscribe from this group, send email to
> [email protected]
> (mailto:[email protected]).
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.