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 <Roger.Kratz@teleopti.com> wrote:Ayende, some purists would say that your examples are bad candidates for PKs, just because they do have a business value.
From: nhibernate-development-bounces@lists.sourceforge.net [mailto:nhibernate-development-bounces@lists.sourceforge.net] 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 <fabiomaulo@gmail.com> 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
Nhibernate-development@lists.sourceforge.net
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
Nhibernate-development@lists.sourceforge.net
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
Nhibernate-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nhibernate-development