Sure, here's the test
[Test]
public void EmployeeMapping_IsOk()
{
new PersistenceSpecification<Employee>(SessionFirebird)
.CheckProperty(c => c.Name, "Any Name")
.CheckProperty(c => c.Phone, "9999-9999")
.CheckProperty(c => c.Job, "Any Job")
.VerifyTheMappings();
}
I think I could not use Identity, because I'm dealing with a Firebird
database...and no, this table doesn't use a generator...
it uses MAX(id) + 1...and I cannot change that...
Thanks.
On Tue, Jun 16, 2009 at 10:52 AM, Hudson
Akridge<[email protected]> wrote:
> I believe you want GeneratedBy.Identity()
> But would you mind posting your test just in case? :)
>
> On Tue, Jun 16, 2009 at 8:24 AM, caiokf <[email protected]> wrote:
>>
>> I'm trying to use FluentNHibernate over a legacy database. I'm also
>> using SQLite for tests.
>>
>> When I try to create a test for the mappings using FluentNHibernate's
>> PersistenceSpecification, I get the following exception:
>>
>> NHibernate.Exceptions.GenericADOException : could not fetch initial
>> value for increment generator
>>
>> I'm mapping my ID like this:
>>
>> Id(f => f.ID, "OID").GeneratedBy.Increment();
>>
>> My test uses SQLite, so when I ran them, the tables are initially
>> empty.
>>
>> Does someone have an idea how to solve this?
>>
>> Thanks.
>>
>>
>
>
>
> --
> - Hudson
> http://www.bestguesstheory.com
> http://twitter.com/HudsonAkridge
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Fluent NHibernate" 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/fluent-nhibernate?hl=en
-~----------~----~----~----~------~----~------~--~---