Re: midgard_guid_new and legacy objects

Piotras <pp-VVDi8QVAvoBWk0Htik3J/[email protected]> Wed, 8 Mar 2006 13:02:08 +0100
Newsgroups gmane.comp.web.midgard.devel
Message-ID <[email protected]>
"Jukka Zitting" <[email protected]> wrote:

> Hi,
> > $person = mgd_get_person(); /* MidgardPerson */
> > /* some code */
> > $person->create();
> 
> mgd_get_person() should generate the GUID.

this is empty constructor. I need to insert guid to database.


> > const gchar *guid;
> > g_object_get(G_OBJECT(object), "guid", &guid, NULL);
> >
> > /* It deson't make sense to check. Throw error!  */
> > if(midgard_is_guid(guid))
> >         g_error("Person object has no guid value");
> 
> That check should never fail on Midgard objects.

I know , that's why I wrote this mail.

Piotras