Ok (and the JIRA is there again)btw the reason to put a versionable entity
working with optimistic-lock for something that does not have absolutely
nothing to update (mean the version has no reason to stay there) is hard to
understand (at least is hard for my mind).

It sound similar to: I know that nothing change but I like to go to DB even
if there is nothing to do, and I like to apply optimistic-lock even when I
know nothing change.

but... taste is taste
http://fabiomaulo.blogspot.com/2009/05/nhibernate-versioning.html


2009/7/13 Tapio Kulmala <[email protected]>

> I didn't mean custom sql-update in the mapping.
>
> I meant that when there is no "updatable" column nhb could generete sql
>
> UPDATE [Contact] SET Id = Id WHERE Id = ? AND Timestamp = ?]
>
> instead of
>
> UPDATE [Contact] SET  WHERE Id = ? AND Timestamp = ?]
>
>
> Tapio
>
>
>
>
> On Mon, Jul 13, 2009 at 3:43 PM, Fabio Maulo <[email protected]> wrote:
>
>> Custom sql-update in the mapping... (in general the POID is something we
>> wouldn't update).
>>
>> 2009/7/13 Tapio Kulmala <[email protected]>
>>
>>> Hi Fabio!
>>>
>>> Well.... You can update even if you don't have "updatable" column.
>>> Try this
>>>
>>> create table NothingToUpdate
>>> (
>>>     Id int not null,
>>>     ts timestamp not null
>>>     CONSTRAINT PK_NothingToUpdate PRIMARY KEY CLUSTERED  (Id)
>>> )
>>>
>>> declare @id int
>>> set @id=1
>>> insert into NothingToUpdate (Id) values (@id)
>>> select ts from NothingToUpdate where id = @id
>>> update NothingToUpdate set @id = @id where id = @id
>>> select ts from NothingToUpdate where id = @id
>>>
>>>
>>> Tapio
>>>
>>>
>>>
>>> On Fri, Jul 10, 2009 at 3:43 PM, Fabio Maulo <[email protected]>wrote:
>>>
>>>> Matthieu...If the base table does not have updatable column meant that
>>>> it can't have a generate version.
>>>> How you can generate a value without hit DB for that table ?
>>>>
>>>> 2009/7/10 Matthieu GD <[email protected]>
>>>>
>>>>
>>>>> I've updated the testcase with the base class with a List as a
>>>>> property. I agree it's not a case you can see often but it is not a
>>>>> wrong one ?
>>>>>
>>>>>
>>>>> Base - > Children
>>>>>  |
>>>>> Derived
>>>>>
>>>>> Matthieu
>>>>>
>>>>> On Jul 10, 12:20 am, Fabio Maulo <[email protected]> wrote:
>>>>> > The discussion will continue in JIRA but it appear as a wrong mapping
>>>>> or at
>>>>> > least a wrong persistent strategy.If the base class as no properties
>>>>> and the
>>>>> > version is generated NH shouldn't try to update it so... the DB can't
>>>>> update
>>>>> > the version.
>>>>> >
>>>>> > 2009/7/9 Matthieu GD <[email protected]>
>>>>> >
>>>>> >
>>>>> >
>>>>> > > On Jul 9, 2:56 pm, Fabio Maulo <[email protected]> wrote:
>>>>> > > > mmmm it sound as a bug... I'm not so sure because we have a lot
>>>>> of tests
>>>>> > > > with version in table-per-class...Can you provide a failing test
>>>>> ?
>>>>> >
>>>>> > > Done :
>>>>> > >http://nhjira.koah.net/browse/NH-1880
>>>>> >
>>>>> > > Matthieu
>>>>> >
>>>>> > --
>>>>> > Fabio Maulo
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Fabio Maulo
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Tapio Kulmala
>>>
>>> "Those are my principles, and if you don't like them... well, I have
>>> others" - Groucho Marx
>>>
>>> http://friendfeed.com/tapsakoo
>>> http://twitter.com/tapiokulmala
>>> http://www.linkedin.com/in/tapiokulmala
>>>
>>>
>>>
>>>
>>
>>
>> --
>> Fabio Maulo
>>
>>
>>
>
>
> --
> Tapio Kulmala
>
> "Those are my principles, and if you don't like them... well, I have
> others" - Groucho Marx
>
> http://friendfeed.com/tapsakoo
> http://twitter.com/tapiokulmala
> http://www.linkedin.com/in/tapiokulmala
>
> >
>


-- 
Fabio Maulo

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