Re: Wasting time?

"Kailuo Wang" <[email protected]>
Newsgroups gmane.comp.windows.dotnet.nhibernate.devel
Message-ID <[email protected]>
the thing is that sometimes we need to store that id as command argument or
parameter in the view layer, which means it will be stored as string.
So we still need to know the type of the id so that we can convert it back
to the type for NHSession.Get/Load, don't we?

On Tue, Jun 17, 2008 at 8:54 AM, Fabio Maulo <[email protected]> wrote:

> I'm sorry friend ... definitive was the time to go to sleep... because my
> post is user-side and not NH-side.
> I'm referring to the entity:
> public class MyEntity
> {
> object Id;
> public object Id
> {
> get {return id;}
> }
> }
>
> nothing to do in NH.
> I'm going to post it in NH-users forum.
>
> 2008/6/17 Ayende Rahien <[email protected]>:
>
> Bug #1234 has a business value because it let me refer to a bug.
>> the number itself has no meaning
>> Name/Revision has business meaning in this context, and are not syntactic.
>>
>> I am not arguing that this is a good idea, but it is something that is
>> very important.
>>
>>
>>
>> On Tue, Jun 17, 2008 at 2:59 PM, Roger Kratz <[email protected]>
>> wrote:
>>
>>>  Ayende, some purists would say that your examples are bad candidates
>>> for PKs, just because they do have a business value.
>>>
>>>
>>>
>>> *From:* [email protected] [mailto:
>>> [email protected]] *On Behalf Of *Ayende
>>> Rahien
>>> *Sent:* den 17 juni 2008 11:53
>>> *To:* the NHibernate development list
>>> *Subject:* Re: [NHibernate-development] Wasting time?
>>>
>>>
>>>
>>> Because they very often _do_ have business value.
>>> Bug #1034 is a meaningful name, even for things that are auto gen PK.
>>>
>>> File 'foo.cs' - Revision # 12 is a meaningful business PK.
>>>
>>> On Tue, Jun 17, 2008 at 7:02 AM, Fabio Maulo <[email protected]>
>>> wrote:
>>>
>>> Walking with my dog a question has invaded the mind.
>>>
>>> Do we are wasting time?
>>>
>>> Let me explain....
>>> First of all the theory:
>>> *POIDs should have absolutely no business meaning whatsoever. Nada. Zip.
>>> Zilch. Zero.*
>>>
>>> >From the point of view of OOP the POID (Persistent Object ID) is
>>> uneeded.
>>> One of the *"invasion"* NH do, in our view of an entity, is that our
>>> entity *must *hold the ID for the persistence.
>>>
>>> In general, in our entity, we have a typed ID (int, Guid, long, composite
>>> etc.)
>>>
>>> Like many of us know NH, internally, can't use a strongly typed Id
>>> exactly because we can use various types including an instance of a special
>>> object (composite).
>>> For all reference to ID NH use System.Object.
>>>
>>> If we are using a ValueType and NH use System.Object, what happen with
>>> Boxing - unBoxing ?
>>> *How many time we are wasting in Boxing-unBoxing?
>>>
>>> *If the *"POIDs should have absolutely no business meaning"*, which
>>> meaning have declare it as int or long ?
>>> Why not use System.Object as a type of our ID ?
>>>
>>> Well... time off... is better to go to sleep.
>>> Fabio Maulo
>>> -------------------------------------------------------------------------
>>> Check out the new SourceForge.net Marketplace.
>>> It's the best place to buy or sell services for
>>> just about anything Open Source.
>>> http://sourceforge.net/services/buy/index.php
>>> _______________________________________________
>>> Nhibernate-development mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/nhibernate-development
>>>
>>>
>>>
>>> -------------------------------------------------------------------------
>>> Check out the new SourceForge.net Marketplace.
>>> It's the best place to buy or sell services for
>>> just about anything Open Source.
>>> http://sourceforge.net/services/buy/index.php
>>> _______________________________________________
>>> Nhibernate-development mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/nhibernate-development
>>>
>>>
>>
>> -------------------------------------------------------------------------
>> Check out the new SourceForge.net Marketplace.
>> It's the best place to buy or sell services for
>> just about anything Open Source.
>> http://sourceforge.net/services/buy/index.php
>> _______________________________________________
>> Nhibernate-development mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/nhibernate-development
>>
>>
>
>
> --
> Fabio Maulo
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> Nhibernate-development mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/nhibernate-development
>
>

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php

_______________________________________________
Nhibernate-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nhibernate-development
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.