Sql Server 2008 column data type bit mapper problem

288 views
Skip to first unread message

enzoscuro

unread,
Dec 20, 2010, 8:40:43 AM12/20/10
to Castle Project Users
Friends, anybody know how mapper a "bit" data type column in sql
server 2008?
i try whith
[Property(Column="estado", ColumnType="bit" )],

but sends the following error code



thank

enzoscuro

unread,
Dec 20, 2010, 9:05:58 AM12/20/10
to Castle Project Users

Could not determine type for: bit, for columns:
NHibernate.Mapping.Column(estado)
en NHibernate.Mapping.SimpleValue.get_Type() en
NHibernate.Mapping.SimpleValue.IsValid(IMapping mapping) en
NHibernate.Mapping.Property.IsValid(IMapping mapping) en
NHibernate.Mapping.PersistentClass.Validate(IMapping mapping) en
NHibernate.Mapping.RootClass.Validate(IMapping mapping) en
NHibernate.Cfg.Configuration.ValidateEntities() en
NHibernate.Cfg.Configuration.Validate() en
NHibernate.Cfg.Configuration.BuildSessionFactory() en
Castle.ActiveRecord.Framework.SessionFactoryHolder.GetSessionFactory(Type
type) en
Castle.ActiveRecord.Framework.SessionFactoryHolder.CreateScopeSession(Type
type) en
Castle.ActiveRecord.Framework.SessionFactoryHolder.CreateSession(Type
type) en Castle.ActiveRecord.ActiveRecordBase.FindByPrimaryKey(Type
targetType, Object id, Boolean throwOnNotFound) en
Castle.ActiveRecord.ActiveRecordBase`1.Find(Object id) en
_Default.Page_Load(Object sender, EventArgs e) en d:\Proyectos
\EmailPostSales\Default.aspx.cs:línea 18

enzoscuro

unread,
Dec 20, 2010, 9:16:26 AM12/20/10
to Castle Project Users

Mauricio Scheffer

unread,
Dec 20, 2010, 9:22:16 AM12/20/10
to castle-pro...@googlegroups.com
I think you're looking for SqlType, not ColumnType.

--
Mauricio



--
You received this message because you are subscribed to the Google Groups "Castle Project Users" group.
To post to this group, send email to castle-pro...@googlegroups.com.
To unsubscribe from this group, send email to castle-project-u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en.


Ricardo Borges

unread,
Dec 20, 2010, 9:32:12 AM12/20/10
to castle-pro...@googlegroups.com
It must be enough:

        [Property]
        public bool Estado { get; set; }



2010/12/20 enzoscuro <enzo...@gmail.com>
--
You received this message because you are subscribed to the Google Groups "Castle Project Users" group.
To post to this group, send email to castle-pro...@googlegroups.com.
To unsubscribe from this group, send email to castle-project-u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en.




--
Ricardo Borges

enzoscuro

unread,
Dec 20, 2010, 9:49:06 AM12/20/10
to Castle Project Users

Charlie

unread,
Dec 20, 2010, 9:58:34 AM12/20/10
to castle-pro...@googlegroups.com
Maybe it is because your decorator is estado and not Estado

[Property(Column="estado", ColumnType="bit" )],

 public bool Estado { get; set; }

regards

2010/12/20 enzoscuro <enzo...@gmail.com>
--

Mauricio Scheffer

unread,
Dec 20, 2010, 10:53:33 AM12/20/10
to castle-pro...@googlegroups.com
Check the inner exception.
Please keep the discussion in the mailing list, I just got this message repeated three times, sent directly to my personal email.

--
Mauricio


On Mon, Dec 20, 2010 at 12:27 PM, enzoscuro <enzo...@gmail.com> wrote:
But change it but now I throw the following error

Could not perform FindByPrimaryKey for Dominio_CapacInbox. Id: 1

en Castle.ActiveRecord.ActiveRecordBase.FindByPrimaryKey(Type
targetType, Object id, Boolean throwOnNotFound) en
Castle.ActiveRecord.ActiveRecordBase`1.Find(Object id) en
_Default.Page_Load(Object sender, EventArgs e) en d:\Proyectos
\EmailPostSales\Default.aspx.cs:línea 19

thank everyone for their response



On Dec 20, 11:22 am, Mauricio Scheffer <mauricioschef...@gmail.com>

wrote:
> I think you're looking for SqlType, not ColumnType.
>
> --
> Mauricio
>

enzoscuro

unread,
Dec 20, 2010, 12:32:52 PM12/20/10
to Castle Project Users
Could not perform FindByPrimaryKey for Dominio_CapacInbox. Id: 1
en Castle.ActiveRecord.ActiveRecordBase.FindByPrimaryKey(Type
targetType, Object id, Boolean throwOnNotFound) en
Castle.ActiveRecord.ActiveRecordBase`1.Find(Object id) en
_Default.Page_Load(Object sender, EventArgs e) en d:\Proyectos
\EmailPostSales\Default.aspx.cs:línea 19

sorry, but I do not understand, it means you can not find the record
with that ID?, I'm really new at this
thank you very much




On Dec 20, 12:53 pm, Mauricio Scheffer <mauricioschef...@gmail.com>
wrote:
> Check the inner exception.
> Please keep the discussion in the mailing list, I just got this message
> repeated three times, sent directly to my personal email.
>
> --
> Mauricio
>
> > <castle-project-users%2Bunsu...@googlegroups.com<castle-project-users%252Buns...@googlegroups.com>

enzoscuro

unread,
Dec 20, 2010, 12:33:56 PM12/20/10
to Castle Project Users
Could not perform FindByPrimaryKey for Dominio_CapacInbox. Id: 1
en Castle.ActiveRecord.ActiveRecordBase.FindByPrimaryKey(Type
targetType, Object id, Boolean throwOnNotFound) en
Castle.ActiveRecord.ActiveRecordBase`1.Find(Object id) en
_Default.Page_Load(Object sender, EventArgs e) en d:\Proyectos
\EmailPostSales\Default.aspx.cs:línea 19

sorry, but I do not understand, it means you can not find the record
with that ID?, I'm really new at this
thank you very much




On Dec 20, 12:53 pm, Mauricio Scheffer <mauricioschef...@gmail.com>
wrote:
> Check the inner exception.
> Please keep the discussion in the mailing list, I just got this message
> repeated three times, sent directly to my personal email.
>
> --
> Mauricio
>
> > <castle-project-users%2Bunsu...@googlegroups.com<castle-project-users%252Buns...@googlegroups.com>

enzoscuro

unread,
Dec 20, 2010, 12:47:45 PM12/20/10
to Castle Project Users
Could not perform FindByPrimaryKey for Dominio_CapacInbox. Id: 1
en Castle.ActiveRecord.ActiveRecordBase.FindByPrimaryKey(Type
targetType, Object id, Boolean throwOnNotFound) en
Castle.ActiveRecord.ActiveRecordBase`1.Find(Object id) en
_Default.Page_Load(Object sender, EventArgs e) en d:\Proyectos
\EmailPostSales\Default.aspx.cs:línea 19

sorry, but I do not understand, it means you can not find the record
with that ID?, I'm really new at this
thank you very much




On Dec 20, 12:53 pm, Mauricio Scheffer <mauricioschef...@gmail.com>
wrote:
> Check the inner exception.
> Please keep the discussion in the mailing list, I just got this message
> repeated three times, sent directly to my personal email.
>
> --
> Mauricio
>
> > <castle-project-users%2Bunsu...@googlegroups.com<castle-project-users%252Buns...@googlegroups.com>

enzoscuro

unread,
Dec 20, 2010, 12:51:32 PM12/20/10
to Castle Project Users
Could not perform FindByPrimaryKey for Dominio_CapacInbox. Id: 1
en Castle.ActiveRecord.ActiveRecordBase.FindByPrimaryKey(Type
targetType, Object id, Boolean throwOnNotFound) en
Castle.ActiveRecord.ActiveRecordBase`1.Find(Object id) en
_Default.Page_Load(Object sender, EventArgs e) en d:\Proyectos
\EmailPostSales\Default.aspx.cs:línea 19

sorry, but I do not understand, it means you can not find the record
with that ID?, I'm really new at this
thank you very much




On Dec 20, 12:53 pm, Mauricio Scheffer <mauricioschef...@gmail.com>
wrote:
> Check the inner exception.
> Please keep the discussion in the mailing list, I just got this message
> repeated three times, sent directly to my personal email.
>
> --
> Mauricio
>
> > <castle-project-users%2Bunsu...@googlegroups.com<castle-project-users%252Buns...@googlegroups.com>

Mauricio Scheffer

unread,
Dec 20, 2010, 12:59:34 PM12/20/10
to castle-pro...@googlegroups.com
A quick google on "inner exception" yields these articles that explain them:


Please check your email client, each of your messages is being sent three or four times.

--
Mauricio


To unsubscribe from this group, send email to castle-project-u...@googlegroups.com.

Charlie

unread,
Dec 20, 2010, 1:29:02 PM12/20/10
to castle-pro...@googlegroups.com
post your complete class



2010/12/20 Mauricio Scheffer <mauricio...@gmail.com>
Reply all
Reply to author
Forward
0 new messages