Hi,

Item is derived from ItemImp. So I think that won't be a problem.
Also it is working if I specify string instead of IList<string>. In
this scenario also I am specifying the class name as Item.

Regards,
Deepraj D

On Dec 21, 8:18 pm, Fernando Zago <[email protected]> wrote:
> BTW, your class name especified in HBM mismatch with your Class name.
>
> <?xml version="1.0" encoding="utf-8" ?>
>
> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="CS3Entities"
> namespace="CS3Entities" auto-import="false">
>
>   <class name="ItemImp" table="[tItem]" batch-size="10">
>
>     <id name="ItemID" column="[ItemID]">
>
>       <generator class="assigned" />
>
>     </id>
>
>     <property  name="League" column="[League]" />
>
>     <property  name="MoreInfoURL" column="[MoreInfoURL]" />
>
>     <property  name="TaxCode" column="[TaxCode]" />
>
>     <property  name="Description" column="[Description]" />
>
>     <property  name="ShortDescription" column="[ShortDescription]" />
>
>     <property  name="HouseDiscount" column="[HouseDiscount]" />
>
>     <property  name="LatePaymentFee" column="[LatePaymentFee]" />
>
>     <property  name="HouseDiscountAmt" column="[HouseDiscountAmt]" />
>
>     <property  name="isArchive" column="[isArchive]" />
>
>     <property  name="EarlyPaymentDisc" column="[EarlyPaymentDisc]" />
>
>     <property  name="InstallmentDeposit" column="[InstallmentDeposit]" />
>
>     <property  name="UnitPrice" column="[UnitPrice]" />
>
>     <property  name="QtyDiscount" column="[QtyDiscount]" />
>
>     <property  name="Interval" column="[Interval]" />
>
>     <property  name="Category" column="[Category]" />
>
>     <property  name="Installment" column="[Installment]" />
>
>     <property  name="QtyDiscountAmt" column="[QtyDiscountAmt]" />
>
>     <property  name="ImageURL" column="[ImageURL]" />
>
>     <list name="ItemType" table="[ItemImp_ItemType]">
>
>       <key column="[ItemType_ItemImpID]" />
>
>       <index column="[Index]" />
>
>       <element column="[ItemType]" />
>
>     </list>
>
>     <property  name="AccountCode" column="[AccountCode]" />
>
>     <property  name="CreatedBy" column="[CreatedBy]" />
>
>     <property  name="CreatedDate" column="[CreatedDate]" />
>
>     <property  name="UpdatedBy" column="[UpdatedBy]" />
>
>     <property  name="UpdatedDate" column="[UpdatedDate]" />
>
>     <property  name="TranID" column="[TranID]" />
>
>   </class>
>
> </hibernate-mapping>
>
> ---
> Fernando Zago
> Arquiteto de Software
> Mult-e – People, solutions and technologyhttp://www.mult-e.com.br/
>
>
>
> On Tue, Dec 21, 2010 at 12:57 PM, Deepraj <[email protected]> wrote:
> > Yes I already removed that. It is not there.
>
> > Regards,
> > Deepraj D
>
> > On Dec 21, 7:50 pm, José F. Romaniello <[email protected]> wrote:
> > > Did you* actually* remove this one <property name="ItemType"
> > > column="ItemType"></property> ?
> > > (you have to)
>
> > > 2010/12/21 Deepraj <[email protected]>
>
> > > > Could not determine type for:
> > > > System.Collections.Generic.IList`1[[System.String, mscorlib,
> > > > Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]],
> > > > mscorlib, Version=2.0.0.0, Culture=neutral,
> > > > PublicKeyToken=b77a5c561934e089, for columns:
> > > > NHibernate.Mapping.Column(ItemType)
>
> > > > This is the error I am getting.
>
> > > > Regards,
> > > > Deepraj D
>
> > > > On Dec 21, 7:44 pm, José F. Romaniello <[email protected]> wrote:
> > > > > What error?
>
> > > > > 2010/12/21 Deepraj <[email protected]>
>
> > > > > > Buddy,
>
> > > > > > Thanks for the assistance.
>
> > > > > > I tried all the options you mentioned one by one, but no luck. It
> > is
> > > > > > throwing the same error.
>
> > > > > >                 <list name="ItemType" table="tItem">
> > > > > >                 <key column="ItemID"/>
> > > > > >                <index column="ItemID"/>
> > > > > >                 <element column="ItemType" type="String"/>
> > > > > >        </list>
>
> > > > > >         <set name="ItemType" table="tItem">
> > > > > >                 <key column="ItemID"/>
> > > > > >                <element column="ItemType" type="System.String"/>
> > > > > >        </set>
>
> > > > > >        <bag name="ItemType" table="tItem" order-by="ItemType ASC">
> > > > > >                <key column="ItemID"/>
> > > > > >                <element column="ItemType" type="string"/>
> > > > > >        </bag>
>
> > > > > > In my case, the table name is tItem
> > > > > >                       primary key is ItemID
> > > > > >                       namespace is CS3Entities
>
> > > > > > Please correct me if I have done anything wrong in specifying set,
> > bag
> > > > > > and list tag.
>
> > > > > > Thank you once again.
>
> > > > > > Regards,
> > > > > > Deepraj D
>
> > > > > > On Dec 21, 4:23 pm, Fernando Zago <[email protected]> wrote:
> > > > > > > Dude,
>
> > > > > > > Sorry, but RTFM...
>
> > > > > > > The class property that are u trying to map is a COLLECTION, so
> > you
> > > > have
> > > > > > to
> > > > > > > map it as collection...
>
> > > > > > > bag, set or list
>
> > > > > > > <bag name="ItemType" table="tItem_ItemTyle" order-by="ItemType
> > ASC">
> > > > > > >     <key column="tItemID"/>
> > > > > > >     <element column="ItemType" type="String"/>
> > > > > > > </bag>
>
> > > > > > > OR
>
> > > > > > > <set name="ItemType" table="tItem_ItemType">
> > > > > > >     <key column="tItemID"/>
> > > > > > >     <element column="ItemType" type="String"/>
> > > > > > > </set>
>
> > > > > > > OR
>
> > > > > > > <list name="ItemType" table="tItem_ItemType">
> > > > > > >     <key column="tItemID"/>
> > > > > > >     <index column="IndexOfList"/>
> > > > > > >     <element column="ItemType" type="String"/>
> > > > > > > </list>
>
> > > > > > > ---
> > > > > > > Fernando Zago
> > > > > > > Arquiteto de Software
> > > > > > > Mult-e – People, solutions and technologyhttp://
> >www.mult-e.com.br/
>
> > > > > > > On Tue, Dec 21, 2010 at 6:30 AM, Deepraj <[email protected]>
> > wrote:
> > > > > > > > HI all,
>
> > > > > > > > I need help in this scenrio defined below.
>
> > > > > > > > I am developing a web application and I have a class structure
> > like
> > > > > > > > this.
>
> > > > > > > > namespace CS3Entities
> > > > > > > > {
> > > > > > > >    public class ItemImp
> > > > > > > >    {
> > > > > > > >        protected const string cogran_classid = "15KD5SE6B3P0";
> > > > > > > >        public ItemImp()
> > > > > > > >        {
> > > > > > > >              this.CreatedDate = DateTime.Now;
> > > > > > > >              this.UpdatedDate = DateTime.Now;
> > > > > > > >        }
>
> > > > > > > >        public virtual string ItemID { get; set; }
>
> > > > > > > >        #region child classes
>
> > > > > > > >        public virtual CS3Entities.ItemRestrict
> > SelectedItemRestrict
> > > > > > > > { get; set; }
>
> > > > > > > >        public virtual ICollection<CS3Entities.ItemRestrict>
> > > > > > > > ItemRestricts { get; set; }
>
> > > > > > > >        #endregion
>
> > > > > > > >        #region popup references
>
> > > > > > > >        public virtual ICollection<CS3Entities.Season>
> > > > > > > > SeasonLastPrograms { get; set; }
>
> > > > > > > >        public virtual ICollection<CS3Entities.SurveyTarget>
> > > > > > > > SurveyTargetItemIDs { get; set; }
>
> > > > > > > >        public virtual ICollection<CS3Entities.Volunteer>
> > > > > > > > VolunteerItemIDs { get; set; }
>
> > > > > > > >        public virtual ICollection<CS3Entities.Team>
> > TeamPrograms
> > > > > > > > { get; set; }
>
> > > > > > > >        public virtual ICollection<CS3Entities.TeamCopyCtrl>
> > > > > > > > TeamCopyCtrlItemIDTos { get; set; }
>
> > > > > > > >        public virtual ICollection<CS3Entities.Season>
> > > > > > > > SeasonNewPrograms { get; set; }
>
> > > > > > > >        public virtual ICollection<CS3Entities.TeamPaymentDtl>
> > > > > > > > TeamPaymentDtlItemIDs { get; set; }
>
> > > > > > > >        public virtual ICollection<CS3Entities.TeamCtrl>
> > > > > > > > TeamCtrlItemIDs { get; set; }
>
> > > > > > > >        public virtual ICollection<CS3Entities.EventItem>
> > > > > > > > EventItemItemIDs { get; set; }
>
> > > > > > > >        public virtual ICollection<CS3Entities.PaymentOption>
> > > > > > > > PaymentOptionItemIDs { get; set; }
>
> > > > > > > >        public virtual ICollection<CS3Entities.TeamPaymentCtrl>
> > > > > > > > TeamPaymentCtrlItemIDs { get; set; }
>
> > > > > > > >        public virtual ICollection<CS3Entities.TeamPaymentCtrl>
> > > > > > > > TeamPaymentCtrlTeamItemIDs { get; set; }
>
> > > > > > > >        public virtual ICollection<CS3Entities.PaymentDtl>
> > > > > > > > PaymentDtlItemIDs { get; set; }
>
> > > > > > > >        public virtual ICollection<CS3Entities.EventReg>
> > > > > > > > EventRegItemIDs { get; set; }
>
> > > > > > > >        #endregion
>
> > > > > > > >        public virtual string League { get; set; }
>
> > > > > > > >        public virtual string MoreInfoURL { get; set; }
>
> > > > > > > >        public virtual double TaxCode { get; set; }
>
> > > > > > > >        public virtual string Description { get; set; }
>
> > > > > > > >        [NotNullNotEmpty(Message = "Required")]
> > > > > > > >        public virtual string ShortDescription { get; set; }
>
> > > > > > > >        public virtual int HouseDiscount { get; set; }
>
> > > > > > > >        public virtual double LatePaymentFee { get; set; }
>
> > > > > > > >        public virtual double HouseDiscountAmt { get; set; }
>
> > > > > > > >        public virtual bool isArchive { get; set; }
>
> > > > > > > >        public virtual double EarlyPaymentDisc { get; set; }
>
> > > > > > > >        public virtual double InstallmentDeposit { get; set; }
>
> > > > > > > >        public virtual double UnitPrice { get; set; }
>
> > > > > > > >        public virtual int QtyDiscount { get; set; }
>
> > > > > > > >        public virtual int Interval { get; set; }
>
> > > > > > > >        public virtual string Category { get; set; }
>
> > > > > > > >        public virtual int Installment { get; set; }
>
> > > > > > > >        public virtual double QtyDiscountAmt { get; set; }
>
> > > > > > > >        public virtual string ImageURL { get; set; }
>
> > > > > > > >        [NotNullNotEmpty(Message = "Required")]
> > > > > > > >        public virtual IList<string> ItemType { get; set; }
>
> > > > > > > >        public virtual string AccountCode { get; set; }
>
> > > > > > > >        #region auditing fields
>
> ...
>
> read more »- Hide quoted text -
>
> - Show quoted text -

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