opensubscriber
   Find in this group all groups
 
Unknown more information…

d : dev@midgard-project.org 15 February 2006 • 11:02PM -0500

[midgard-dev] midgard_guid_new and legacy objects
by Piotras

REPLY TO AUTHOR
 
REPLY TO GROUP





Hi!

Problem description:
midgard struct mgd has GObject member ( currently defined as gpointer
due to not being cleaned yes header files ) which is a pointer to MgdObject
with midgard_person as type. When person do some auth I set internally
this object as connection handler's member. This is done to have  ( always
during runtime )  every  person's data like guid for example.

However,  problem appears when you for example create person with spider
and next you do auth and try to create new type. Simply there's no guid property
being set for midgard_person object.

We need to create Midgard Lite (M-L) implementation anyway after 1.8 is out, so
I decided to add guids and other basic metadata support for legacy objects.

Advantages:
* We can still "mix up" old and new types using any admin UI
* No need to future special "old" record updates
* new fields are added to old objects transparently without touching objects properties
* M-L implemenation will be ready for new classes
( even if records were created with old API )
* we do not deprecate old API for one release and bring it to live again in another release

Technically I wil update only mgd_vcreate and mgd_vupdate functions so we will have new features
basic support for all old classes with one change.

My question now is:

Should I run another two queries when object is created or updated to get and insert the same guid
or to tune old guids functions ( make only two queries ) and make uuid support at the same time?

Piotras

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@midg...
For additional commands, e-mail: dev-help@midg...

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.