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

Does externalID change from session to session? and...

3 views
Skip to first unread message

anaunt

unread,
Apr 1, 2007, 8:38:07 PM4/1/07
to
 Hi folks,
2 Questions come to mind:

If I store a reference to the ExternalID of an object, will that stored
reference access that same object everytime I fire up the program, or
should I expect the ExternalID of an object to change from session to
session???

Maybe I should ask Jesper this one. The list of DataDescriptors in his
dynamic data model define the list of data objects owned by the root
class. Does that mean I can expect the indexes to match between the
two? (if I use the index of a given descripton on the data list, will I
ALWAYS be handed the data defined by that description?) So far in my
testing this is true, but I would feel a whole lot more comfortable in
such a huge assumption if I new more facts.

--- posted by geoForum on http://delphi.newswhat.com

Dmitriy Nagirnyak

unread,
Apr 2, 2007, 2:40:08 AM4/2/07
to
Hello anaunt,

> If I store a reference to the ExternalID of an object, will that
> stored reference access that same object everytime I fire up the
> program, or should I expect the ExternalID of an object to change from
> session to session???
>

The ExternalId will not change from session to session.
It will (may) change between model changes (the descriptor value. So ExternalId
"23:12" may become "30:12").

If you want to be sure the ExternalId is never changed you need to use custom
mapping XMl where you can define Descriptor manually and Patched ExternalIdService
(from EcoIIIPatches).


Ragards,
Dmitriy Nagirnyak
http://www.argocomputing.com.au
http://dnagir.blogspot.com


anaunt

unread,
Apr 2, 2007, 10:51:49 AM4/2/07
to
THanks Dmitriy!
This is very helpful...I appreciate it!!

>If you want to be sure the ExternalId is never changed you need to use
custom
>mapping XMl where you can define Descriptor manually and Patched
ExternalIdService
>(from EcoIIIPatches).
>
>
>Ragards,
>Dmitriy Nagirnyak
>http://www.argocomputing.com.au
>http://dnagir.blogspot.com
>
>
>

--- posted by geoForum on http://delphi.newswhat.com

Peter Morris [Droopy eyes software]

unread,
Apr 2, 2007, 11:45:42 AM4/2/07
to
If you explicitly model a root class from which every other class ultmately
descends then you could quite easily add a GUID to that base class and
always fetch your objects using that.


--
Pete

Blessed are the geek, for they shall public class GeekEarth : Earth {}
====
Audio compression components, DIB graphics controls, ECO extensions,
FastStrings : http://www.droopyeyes.com
My blog : http://mrpmorris.blogspot.com

Richard Vowles

unread,
Apr 3, 2007, 4:34:35 AM4/3/07
to
Peter Morris [Droopy eyes software] wrote:
> If you explicitly model a root class from which every other class
> ultmately descends then you could quite easily add a GUID to that base
> class and always fetch your objects using that.
>
>

You should get Gerrit to add that as a feature to ECOModeler.

anaunt

unread,
Apr 4, 2007, 11:20:23 AM4/4/07
to
Dmitri,
I have to confess to great ignorance. I've tried to install the patches
by opening and compiling the groups I found in the folder, but I only
get an error message that it cant find a dpr. I tried installing Peters
extentions as well, but they can't find assemblies. I tried adding the
folder to various paths I found, but have not yet found where they need
to be. So...

Would anyone mind terribly pointing me to some help on exactly how one
installs/makes use of the ECO III patches or Peter's extentions?

Peter even includes beautiful help documents, but unfortunately, I
found nothing on this really basic level that I need...how to install.

I am so unfamiliar with the C language and .net, I don't even know where
in the ide to tell it to look for the assemblies it wants. So many
places set 'paths'.

Any help would be gratefully received!

>If you want to be sure the ExternalId is never changed you need to use
custom
>mapping XMl where you can define Descriptor manually and Patched
ExternalIdService
>(from EcoIIIPatches).

--- posted by geoForum on http://delphi.newswhat.com

Dmitriy Nagirnyak

unread,
Apr 4, 2007, 11:42:52 AM4/4/07
to
Hello anaunt,

> Dmitri,
> I have to confess to great ignorance. I've tried to install the
> patches
> by opening and compiling the groups I found in the folder, but I only
> get an error message that it cant find a dpr.

There're some projects: for Delphi.NET and for C#.
To compile C# version (that dosn't include patched constraints operation)
you need to open EcoIIICsPatches.bdsproj project.

After that you have to add reference from your project to compiled assembly.

There's some routine with that, so if you want I can send you the DLL (I
signed it so you can add it to GAC too).

To allow Eco pick up external id from mapping you can add the code to you
EcoSpace:
public override bool Active
{
get {
return base.Active;
}
set {
base.Active = value;
if (value)
{
new ExternalIdServiceImpl(
FrontsidePolicy,
OclServicesImpl,
this.EcoServiceProvider,
(PersistenceMapper as PersistenceMapperBdp).EffectiveRunTimeMappingProvider.Mapping);
}
}
}

And also add:
using Borland.Eco.Patches;

I'm not sure if ECOIIPatches were updated since I discussed the feature to
take IDs from mapping with Jonas.
If there will be error when you'll try to compile this, I will have to take
my version of updated patches.

I wonder if nobody else use Descriptors from mapping :)

> I tried installing
> Peters
> extentions as well, but they can't find assemblies.

I belive you don't actually need to do anything.
Have you tried to add reference to compiled DLL in the ZIP just from your
project?

anaunt

unread,
Apr 4, 2007, 2:29:21 PM4/4/07
to
>If you explicitly model a root class from which every other class
ultmately
>descends then you could quite easily add a GUID to that base class and
>always fetch your objects using that.

I don't know if I can. Of COURSE I am likely to have created an
unrelated problem by doing so, but when I tried to make one of my
classes derive from a common ancestor of the others, it gave me circular
reference errors. I could, however, create two sets of GUID's needed in
the same place where the externalID's are assigned. I should really
look into that, thanks.

anaunt

unread,
Apr 4, 2007, 2:33:50 PM4/4/07
to
Thanks so much for your patience!

Yes, I think I have Peter's extentions going.

It was the EcoIIIPasPatches.bdsproj that could not find a dpr
The EcoIIICsPatches.bdsproj gave me the following error:
[C# Error] ORMappingXmlReader.cs
(381): 'Borland.Eco.Interfaces.InterfacesStringRes' does not contain a
definition for 'sUnknownColumnInAttribute'

Maybe the easiest thing to do would be take you up on your offer of the
dll. My email is:
myoddends [at] hotmail.com


So much to learn, so little time!

--- posted by geoForum on http://delphi.newswhat.com

0 new messages