Re: Wasting time?
"Ayende Rahien" <[email protected]>
| Newsgroups | gmane.comp.windows.dotnet.nhibernate.devel |
|---|---|
| Message-ID | <[email protected]> |
Who does something like that? If you want that, let NH keep hold of the ID. On 6/17/08, 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