Subject Re: [IBO] Request with Field Origin
Author Jason Wharton
I agree this is an area that could use some closer attention.
Did you make any modifications to the IBO sources to suit this?
If so, I could probably just merge them in.
I agree that if there is a value in the ORIGIN property then I could just
leave it alone.

Jason Wharton
www.ibobjects.com

----- Original Message -----
From: "Matt Nielsen" <mnielsen@...>
To: <IBObjects@yahoogroups.com>
Sent: Friday, January 02, 2004 11:41 AM
Subject: [IBO] Request with Field Origin


> I've noticed that the new version of IBO now populates the origin
> under all circumstances. I use this field for the same purpose that
> IBO does to store the real tablename.fieldname I then use this for
> different reasons but mostly for use on grids and column sorting and
> building query statemens. The problem is that IBO doesn't generate
> the correct origin if you have table aliasing. Meaning if I have the
> following SQL:
>
> SELECT
> TABLEA.COLUMNA,
> ALIASA.COLUMNA AS ALIASA_COLUMNA,
> ALIASB.COLUMNA AS ALIASB_COLUMNB
> FROM TABLEA
> LEFT OUTER JOIN TABLEB ALIASA
> ON (TABLEA.LINK1 = ALIASA.SEQNO)
> LEFT OUTER JOIN TABLEB ALIASB
> ON (TABLEA.LINK2 = ALIASB.SEQNO)
>
> Then IBO would generate an origin for the for field ALIASA_COLUMNA as
> TABLEB.COLUMNA when it should have generated ALIASA.COLUMNA.
>
> A simple fix is that if the origin already has data in it then don't
> overwrite it when IBO generates the field.
>
> Another solution would be to teach the parser how to deal with table
> aliases.
>
> Another request would be to have the values of the origin at design
> time not just runtime, certainly you would need to prevent it from
> overwriting values if this was implemented.
>
>
>
> Thanks,
>
> Matt Nielsen
> Caelix, Inc
>