Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Again about IDs

2 views
Skip to first unread message

Dmitriy Nagirnyak

unread,
Aug 6, 2008, 8:24:56 AM8/6/08
to
Hi,

I am looking for the best approach to use objects IDs (not some externalId).
It should:
- Be the value stored in DB as PK.
- Easily accessible from ECO Objects.
- Easily obtainable by object type and ID.

I'm thinking about adding extension method over ILoopBack: int GetId(). The
method knows everything to obtain the ID.
Also extend EcoSpace (or whatever interface) with GetById<TYPE>(int id).

This is good enough but following there are couple of disadvantages:
- NA in OCL
- GetID is always calculated. Not sure how fast it is.
- GetByID - the same.

Maybe it's just better to add ID property to class itself and map it to column
in DB?

No usage of externalId please.

Comments?

Cheers,
Thanks.


Peter Morris

unread,
Aug 7, 2008, 6:39:41 AM8/7/08
to
Please explain
A: Why not an IExternalIdService implementation, and
B: How you want to use the ID


Pete

0 new messages