Ticket #1390 (new enhancement)

Opened 2 months ago

Last modified 2 months ago

Extend DB_DataObjects functionality

Reported by: pentarim Assigned to: demian
Priority: normal Milestone: 0.7.0
Component: SGL - DB Version:
Severity: open Keywords: dataobjects
Cc:

Description

Add ability to use multiple databases Add ability for dataobjects to extend custom class

Attachments

MultiDbPatch_r2927.patch (9.1 kB) - added by pentarim on 02/06/07 08:13:50.
Adds ability to handle multiple db`s & extend own class

Change History

02/06/07 08:13:50 changed by pentarim

  • attachment MultiDbPatch_r2927.patch added.

Adds ability to handle multiple db`s & extend own class

02/06/07 08:16:45 changed by pentarim

Little explanation


Extending own DataObject? class


This could be usefull for centralised validation & custom dataobjects functions

After regular install, copy file @SGL_DIR@/etc/_SGL_DO.php to @SGL_DIR@/var/model/_SGL_DO.php

And change your @SGL_DIR@/var/yourdomain.conf.php to $confdbdo?extends? = '_SGL_DO';

IMPORTANT : check the generated files in @SGL_DIR@/var/model , if the don`t require the right file (bug of generator), you should make a BACKUP of them first, delete them & re-generate


Using multiple DB`s


Add to your @SGL_DIR@/var/yourdomain.conf.php

$confdbdo?db_pool?fonlight?type? = 'mysql'; $confdbdo?db_pool?fonlight?host? = 'localhost'; $confdbdo?db_pool?fonlight?protocol? = 'unix'; $confdbdo?db_pool?fonlight?socket? = ; $confdbdo?db_pool?fonlight?port? = '3306'; $confdbdo?db_pool?fonlight?user? = 'root'; $confdbdo?db_pool?fonlight?pass? = ; $confdbdo?db_pool?fonlight?name? = 'exampledb';

02/06/07 08:18:02 changed by pentarim

  • owner changed from pentarim to demian.
  • milestone set to 0.7.0.