Hello,
I have a class like this:
public class IndustrySector : IEntity
{
public Guid Id { get; set; }
public string Name { get; set; }
}
which I map as follows:
<class name="IndustrySector" table="`IndustrySector`"
xmlns="urn:nhibernate-mapping-2.2">
<id name="Id" column="Id" type="Guid">
<generator class="guid.comb" />
</id>
<property name="Name" column="Name" length="100" type="String">
<column name="Name" />
</property>
</class>
I'm using hbm2ddl to generate my database schema int MS Sql Server
2005 and it all works well with one exception. I'd like my database
table to have a default value of "newid()" on the Id column. This
would allow me to easily insert data by hand into the tables. Can
hbm2ddl do this for me? And if so, how?
TIA,
John
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---