I'm working with an existing database, and want to make use of
NHibernate.  One of the columns of the database makes use of the SQL
Server 2008 HierarchyId type.

Currently, I don't see anything in the SQL Server dialects that
support HierarchyId.  There is some support for spatial stuff in the
2008 dialect.  Does anyone know it there is any support expected for
HierarchyId in the future?

Specific to the database/project.  entityId which is a HierarchyId is
the Primary Key column for the table.  So, I was thinking of either
implementing my own db function to populate the hierarchyId column.
Currently, I was thinking of either creating a function to populate
this column.  Is there a way to use this function as part of a
customer generator?  Or should I just use my own stored-proc or query
for insert?


CREATE TABLE [Entity](
        [entityId] [hierarchyid] NOT NULL,
        [parentId]  AS ([entityId].[GetAncestor]((1))),
        [entityName] [nvarchar](128) NOT NULL,
        [description] [nvarchar](4000) NULL,
        [guid] [uniqueidentifier] NOT NULL,
        [fkid_Type] [uniqueidentifier] NOT NULL,
        [created] [datetime] NOT NULL,
        [modified] [datetime] NULL,
 CONSTRAINT [PK_Entity] PRIMARY KEY NONCLUSTERED
(
        [entityId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY
= OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

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