Re: Wasting time?
"Ayende Rahien" <[email protected]>
| Newsgroups | gmane.comp.windows.dotnet.nhibernate.devel |
|---|---|
| Message-ID | <[email protected]> |
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