How do you identify rows in it then? There has to be some kind of key,
even if it isn't a surrogate.
On Thursday, December 31, 2009, Nizam wrote:
> Hi,
> In my table doesn't have an primarykey, so i need not to use the id
> property in the hbm Right?. If I removed the id property then the hbm
>
You need a Primary key property in your class (int if doing native with
mssql). And you also need to give it a column name if you're going to use
the column attribute. You also shouldn't need a dbo. prefix for your table
name.
Try getting started with the FNH example application included with the
Hi this is my Mapping file
Entity File:
using System;
using System.Collections.Generic;
using NHibernate.Validator;
using PremierAccess.Framework.Data;
namespace PremierAccess.BAS.Core.Domain
{
public class UcrM
You need an Id element for NHibernate mappings, that's what NHibernate uses
to identify the entity. If you don't have one, NHibernate doesn't know how
to persist/retrieve data from the DB.
The Id Doesn't have to be a single column PK though, you can use a composite
Id mapping and combine multiple
Hi Guys,
I was tried to map the table without having an primary key, I got
an error like"property is invalid in the mapping file. expected id
property".
Then I tried with creating id property and i am not specified the
column, even though I cannot proceed ... I caught up with an error "
Sys