Hi - I am working on a legacy database, moving business logic from SP
to domain objects relying NHibernate.

I have encountered the following in a SP used to insert a "Product"
row:

DECLARE @productNumber int
SET @productNumber = (SELECT isnull(MAX(ProductNumber), 401100) +1
FROM Product)

INSERT INTO Product (
 .... [ProductNumber] ...
)
VALUES (
 .... @productNumber
)

I do not think its pretty, but is there anyway I can reproduce this
with NH ?

I am not even sure the existing solution does not contain a race
condition.

Cheers,
Thomas
--~--~---------~--~----~------------~-------~--~----~
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