It was a different field altogether that was marked as a boolean.
Sorry for the time wasting.

On Nov 18, 11:22 am, Fabio Maulo <[email protected]> wrote:
> To NH you said that it is a boolean but from DB what come is a string
>
>
>
>
>
>
>
>
>
> On Thu, Nov 18, 2010 at 1:20 PM, ccupstart <[email protected]> wrote:
> > It's not a boolean, it's a string. I don't get why it is trying to
> > format that field as a Boolean.
>
> > On Nov 18, 11:19 am, Fabio Maulo <[email protected]> wrote:
> > > String was not recognized as a valid Boolean.
>
> > > On Thu, Nov 18, 2010 at 1:05 PM, ccupstart <[email protected]>
> > wrote:
> > > > I have a newly created project and I am using Fluent NHibernate to map
> > > > my objects. I am able to save an object just fine but when I try to
> > > > load that object and access any properties with a string type I get a
> > > > format exception. I am using using the latest version of NHib and
> > > > LinFu for my proxy factory.
>
> > > > Here is a stack trace form when I load the object and try to access
> > > > the "FirstName" property. Any ideas?
>
> > > > Test 'Mytrade.Tests.UserRepositoryTest.Can_Save_To_Datatbase' failed:
> > > > NHibernate.Exceptions.GenericADOException : could not load an entity:
> > > > [Mytrade.Core.Model.User#2][Sql query here]
> > > >  ----> System.FormatException : String was not recognized as a valid
> > > > Boolean.
> > > >        at NHibernate.Loader.Loader.LoadEntity(ISessionImplementor
> > session,
> > > > Object id, IType identifierType, Object optionalObject, String
> > > > optionalEntityName, Object optionalIdentifier, IEntityPersister
> > > > persister)
> > > >        at
> > > > NHibernate.Loader.Entity.AbstractEntityLoader.Load(ISessionImplementor
> > > > session, Object id, Object optionalObject, Object optionalId)
> > > >        at NHibernate.Loader.Entity.AbstractEntityLoader.Load(Object id,
> > > > Object optionalObject, ISessionImplementor session)
> > > >        at
> > NHibernate.Persister.Entity.AbstractEntityPersister.Load(Object
> > > > id, Object optionalObject, LockMode lockMode, ISessionImplementor
> > > > session)
> > > >        at
>
> > NHibernate.Event.Default.DefaultLoadEventListener.LoadFromDatasource(LoadEv
> > ent
> > > > event, IEntityPersister persister, EntityKey keyToLoad, LoadType
> > > > options)
> > > >        at
> > > > NHibernate.Event.Default.DefaultLoadEventListener.DoLoad(LoadEvent
> > > > event, IEntityPersister persister, EntityKey keyToLoad, LoadType
> > > > options)
> > > >        at
> > NHibernate.Event.Default.DefaultLoadEventListener.Load(LoadEvent
> > > > event, IEntityPersister persister, EntityKey keyToLoad, LoadType
> > > > options)
> > > >        at
> > > > NHibernate.Event.Default.DefaultLoadEventListener.OnLoad(LoadEvent
> > > > event, LoadType loadType)
> > > >        at NHibernate.Impl.SessionImpl.FireLoad(LoadEvent event,
> > LoadType
> > > > loadType)
> > > >        at NHibernate.Impl.SessionImpl.ImmediateLoad(String entityName,
> > > > Object id)
> > > >        at NHibernate.Proxy.AbstractLazyInitializer.Initialize()
> > > >        at
> > > > NHibernate.ByteCode.LinFu.LazyInitializer.Intercept(InvocationInfo
> > > > info)
> > > >        at UserProxy.get_FirstName()
> > > >        UserRepositoryTest.cs(45,0): at
> > > > Mytrade.Tests.UserRepositoryTest.Can_Save_To_Datatbase()
> > > >        --FormatException
> > > >        at System.Boolean.Parse(String value)
>
> > > > --
> > > > 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]<nhusers%[email protected]
> > > >  >
> > <nhusers%[email protected]<nhusers%252bunsubscr...@googlegroup 
> > s.com>>
> > > > .
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/nhusers?hl=en.
>
> > > --
> > > Fabio Maulo
>
> > --
> > 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]<nhusers%[email protected] 
> > >
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/nhusers?hl=en.
>
> --
> Fabio Maulo

-- 
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.

Reply via email to