That's a good question, Horus. :-/
I haven't tried that. Theoretically, db_cas.base_tags field could be
referenced because it needs the db object.
Let us know about your progress on it.
--
Vinicius Assef
On 07/06/2012 03:40 PM, Horus wrote:
Right viniciusban i agree. i don't want to perform joins across
databases explicitly i have never seen that in SQL
BUT I can use the user id from the CAS provider to refer to other tables
in a database
let's say the *CAS* provider has this table called *auth_user* with a
field called *id*.
let's say I have another app called *APP1* with a table
called*user_exams* with a field called *user_id*
To make a relationship I can manually get the id from the auth_user
table (db.auth_user)
and then apply it to the user_exams.
the *CAS* provider contains this table
db.define_table('base_tags',
Field('name', 'string', label='Tag', length=64,
required=True, notnull=True),
format='%(name)s'
)
*APP1* contains a this table
db.define_table('places_tags',
Field('place_id', db_app1.places, label='Place',
required=True, notnull=True, writable=False, readable=False),
Field('tag_id', *db_cas.base_tags*, label='Tag',
required=True, notnull=True, writable=False, readable=False)
)
*Are you saying that Web2Py will not get id from base tags and make that
relationship?*
On Friday, July 6, 2012 1:56:47 PM UTC-4, viniciusban wrote:
Short answer: manually.
You cannot connect (join or make a relation) fields among different
databases.
On 07/06/2012 02:16 PM, Horus wrote:
> Yes I understand CAS is for central auth, so i have let the cas provider
> be the app that takes care of login, registration, signup, what have
> you; as it should
> the tables are being created, so I am assuming that the other apps
> should be able to access the tables if they exist all in the same
database.
>
> The underlying question, as I had added.
> *
> how does web2py perform multiple database information exchange?*
>
>
> On Friday, July 6, 2012 12:45:16 PM UTC-4, David Marko wrote:
>
> Well CAS is for central authentication, not for sharing database
> tables ... . The error you got simply says that your second app cant
> see tables from cas provider app.
>