@Ayende
Are you familiar with the T-SQL 2005 OUTPUT statement? It could help
if we want to avoid extra roundtrips to the DB.
For example, try this
DECLARE @Test TABLE
( TestId [int] IDENTITY(1,1) NOT NULL
, Amount decimal(10,2)
, ts timestamp )
INSERT INTO @Test (Amount)
OUTPUT INSERTED.*
VALUES (100)
UPDATE @Test SET Amount = Amount * 10
OUTPUT INSERTED.*
WHERE TestId = 1
Could sql2005 dialect take advantage of this feature?
Tapio
On Nov 7, 7:44 pm, "Ayende Rahien" <[EMAIL PROTECTED]> wrote:
> Probably, the issue is likely because we have to hit the DB to get the id
> anyway
>
> On Fri, Nov 7, 2008 at 7:43 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> > That is exactly why it wasn't working. If i use "assigned" for the
> > generator class for the id for my class instead of "identity", it
> > works. My Save caches as expected. I'm going to mess around with it
> > a litttle more and try to understand it better. At this point it is
> > looking like I can't use an identity column for the id of my objects
> > if I want them to go into the second level cache when they are saved.
> > Is this correct?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---