Joined tables and hidden fields visible

A place for users and developers of the Xataface to discuss and receive support.

Joined tables and hidden fields visible

Postby Jean » Mon Jun 08, 2009 11:52 pm

Hi Steve and all,
I have the last version of Xataface.
I have a sql request in my fields.ini with a left joint
Code: Select all
__sql__="select a.givenName AS givenName, a.sn AS sn, b.otherTelephone AS otherTelephone, b.mobile AS mobile, b.telephoneNumber AS telephoneNumber, b.employeeID AS employeeID, b.sAMAccountName AS sAMAccountName from annuaire_jointure AS a NATURAL LEFT JOIN annuaire_export AS b where CHAR_LENGTH(b.otherTelephone)>0 OR CHAR_LENGTH(b.telephoneNumber)>0 OR CHAR_LENGTH(b.mobile)>0"

Then I add a statement on 2 fields
Code: Select all
[employeeID]
visibility:list = hidden;
visibility:browse = hidden
visibility:edit = hidden

[sAMAccountName]
visibility:list = hidden
visibility:browse = hidden
visibility:edit = hidden

But the two fields appear in my list. What is wrong or what could I do ?
Thank you
Jean
Jean
 
Posts: 259
Joined: Wed Nov 07, 2007 1:30 am
Location: Pau, France

Postby shannah » Tue Jun 09, 2009 4:07 am

One thought is that if you are using windows, it seems to force all column names to lower case which can muck with Xataface settings that are case-sensitive.

E.g.

try changing
[employeeID]
to
[employeeid]

to appease windows (if you are using windows).

Another comment aside from this is that if you are using the __sql__ mechanism you should make sure that the result set has a superset of columns, and a one-to-one mapping of rows to the original table. I.e. it should at least contain all of the columns of the original table and should not contain a where clause. It is possible that things will work for the most part without obeying this, but there may be undefined behavior at some point as Xataface is written with this assumption.

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby Jean » Tue Jun 09, 2009 11:52 pm

Thank you Steve. I eventuallly find a way to leave it like this.
Jean
Jean
 
Posts: 259
Joined: Wed Nov 07, 2007 1:30 am
Location: Pau, France

Postby silma » Thu Jun 11, 2009 1:37 am

Hello,

I had the same problem with one of my many to many relationship.

Finally, i created a directory and a fields.ini for the join table involved, and i hid the recalcitrant fields there.

Hope this help. (And sorry for the english...)

Silma
Last edited by silma on Thu Jun 11, 2009 6:42 am, edited 1 time in total.
silma
 
Posts: 87
Joined: Tue Apr 28, 2009 11:47 pm

Postby Jean » Thu Jun 11, 2009 5:15 am

Hello Silma,
Thank you very much. I did not succeed to achieve it, there must be a problem somewhere else in my program.
Jean
Jean
 
Posts: 259
Joined: Wed Nov 07, 2007 1:30 am
Location: Pau, France


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 29 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved