Re: Propel Database backend
Lukas Kahwe Smith <[email protected]> Wed, 24 Aug 2005 12:32:52 +0200
| Newsgroups | gmane.comp.php.pear.liveuser |
|---|---|
| Message-ID | <[email protected]> |
Georg Gell wrote:
> Lukas Kahwe Smith schrieb:
>
>>The only thing that might need a bit of work and where I am willing to
>>talk about things in the layout of the two Globals.php files which
>>define the structure. Propel might have something of its own here.
>
>
> hmm, I haven't seen the Globals.php until now :( What do they do?
>
> $GLOBALS['_LiveUser'][*]['tables'] <- this is just a description of the
> tables? If yes I don't need it because Propel creates it's classes out
> of the XML description of the database, so afaik i need no runtime info
> about the database structure. Is this needed somewhere else or only in
> the database containers?
Its used only in the storage containers. However keep in mind that this
information can be overwritten with user configurations. It might
however be more feasible to simply not allow such configuration and find
a more propel#ish solution for people to customize certain aspects.
> $GLOBALS['_LiveUser'][*]['fields'] <- same as above?
/me nods
> $GLOBALS['_LiveUser'][*]['alias'] <- ??? is this to help me change a
> field name in a table? But I can't change the table name? Shouldn't the
> alias array rather look like
> $GLOBALS['_LiveUser'][*]['alias'] = array( 'table1' =>
> array ('alias' => 'table1_alias',
> 'fields' => array(
> fields...)
> ),
> table2...
> )
> or am I completely wrong?
LiveUser's current storage containers work under the assumption that
field an tables names are globally unique. This was done to simplify the
API in the LiveUser_Admin classes, which are able to automatically
determine the necessary joins just from the field name.
The purpose of the alias is that LiveUser expects all data coming back
from the storage layer to use the default table/field names. Using the
alias people can have different field names than those default
table/field names inside their database.
> what is pecl::sdo? or do you mean pdo?
http://pecl.php.net/package/sdo
http://php.net/sdo
regards,
Lukas