Following user manual

5 views
Skip to first unread message

SwissalpS

unread,
Dec 15, 2009, 10:39:05 AM12/15/09
to phocoa users
I'm following the manual (PHOCOA User Guide.xml) and updating the
changes as I go.

Doing everything as in the manual except for choosing mysql.

So now I have the 'blog' project as far as Hello PHOCOA
only that I don't see the examples. Instead error ..../blog/blog/conf/
blog-conf.php not found.

How do you recommend proceeding? should I 'reverse' from an empty db
or create a blog-conf.php?
(now that I know how it's supposed to be formed...)

cheers - Luke

SwissalpS

unread,
Dec 15, 2009, 10:57:13 AM12/15/09
to phocoa users
I suggest not adding propel unless the user wants to reverse from an
existing db.

For the sake of giving first timers a positive experience from the get
go and building from that.

Alan Pinstein

unread,
Dec 15, 2009, 11:16:09 AM12/15/09
to phocoa...@googlegroups.com
So did you get it fixed?

I can't tell...

I need to do some more work to phocoa to rig it up to my config-magic
setup which solves all of these problems. I just haven't had a chance
yet unfortunately.

I haven't managed conf files in that way in about 6 months or built
many projects from scratch in a long time.

When propel went from 1.2 to 1.3 they changed to PDO and also the way
convert-conf vs convert-props works and I think it caused the problems
you're seeing.

You might need to just run convert-conf from propel, which should
create that file.

Alan
> --
>
> You received this message because you are subscribed to the Google
> Groups "phocoa users" group.
> To post to this group, send email to phocoa...@googlegroups.com.
> To unsubscribe from this group, send email to phocoa-users...@googlegroups.com
> .
> For more options, visit this group at http://groups.google.com/group/phocoa-users?hl=en
> .
>
>

SwissalpS

unread,
Dec 15, 2009, 12:56:25 PM12/15/09
to phocoa users
thanks Alan, my setup is now working fine.

Which enables me to look and see what the files should look like that
are missing when I follow the manual step by step (appart from mysql/
postgres)

Am working on the documentation just to help clean things up.
Possibly it would be better to wait until you have redone the whole
process.....really depends on how high priority this part has for
you :-)

My motivation is to know that my troubles weren't for me alone, and
that I can tell friends to download and try without having to send
them a patch or similar.

Luke

SwissalpS

unread,
Dec 15, 2009, 3:59:21 PM12/15/09
to phocoa users
Having now reverse engineered the empty blog database with:

phocoa addpropel

I have a bunch of classes and config files now.
so I run fix-schema.php (not required, I'm just checking all the way)

next step in the tutorial is to create a module:

cd blog/blog/modules
phocoa createSkeletonFromPropel

here the prompt is different from the tutorials:
Which entities do you want to create scaffolds for?

not knowing what to enter, I try
blog

what is it, that I should enter here? the database name, table name,
column or a combination?

I can't say, as there's a propel related error: propel/engine/database/
model/NameFactory.php can't be found.

if propel 1.3 needs to be edited any farther, I wonder if it weren't
more efficient to tackle 1.4

any input - appreciated

SwissalpS

unread,
Dec 15, 2009, 4:37:01 PM12/15/09
to phocoa users
there was no engine folder in my propel 1.3 installation, copied it
from a 1.4 copy
...

SwissalpS

unread,
Dec 15, 2009, 4:39:28 PM12/15/09
to phocoa users
Blog

is the correct answer to:

Alan Pinstein

unread,
Dec 15, 2009, 4:41:52 PM12/15/09
to phocoa...@googlegroups.com
Yes, that's correct. The "PHP Names" (ie class names" generated by Propel of the classes you want scaffolded.

Alan

SwissalpS

unread,
Dec 15, 2009, 6:51:49 PM12/15/09
to phocoa users
tutorial recomends: You can now visit your blog editing module at
http://servername/blog

when I do so:

An uncaught exception (Exception) has occurred:

arrayController must be a WFArrayController.

Stack Trace:


Exception: Exception
Error: arrayController must be a WFArrayController.
URL: http://debian2:8080/blog/list
Referrer: (none)
Trace: #0 /usr/share/php/phocoa/framework/WFObject.php(389): WFDynamic-
>setArrayController('')
#1 /usr/share/php/phocoa/framework/WFObject.php(449): WFObject-
>setValueForKey('', 'arrayController')
#2 /usr/share/php/phocoa/framework/WFPage.php(631): WFObject-
>setValueForKeyPath('', 'arrayController')
#3 /usr/share/php/phocoa/framework/WFPage.php(1110): WFPage-
>initInstanceYAML('title', Array)
#4 /usr/share/php/phocoa/framework/WFModule.php(379): WFPage->initPage
('list')
#5 /usr/share/php/phocoa/framework/WFRequestController.php(137):
WFModuleInvocation->execute()
#6 /usr/share/php/phocoa/framework/WFRequestController.php(162):
WFRequestController->handleHTTPRequest()
#7 /usr/share/php/phocoa/framework/WFWebApplication.php(160):
WFRequestController->handleHTTPRequest()
#8 /usr/share/php/phocoa/framework/WFWebApplication.php(18):
WFWebApplication->runWebApplication()
#9 /home/luke/phocoa_projects/blog/blog/wwwroot/index.php(6):
WFWebApplicationMain()
#10 {main}
... php env dump ...

is this still propel doing something wrong or have I finally arrived
at a pure phocoa issue?

Alan Pinstein

unread,
Dec 15, 2009, 9:01:47 PM12/15/09
to phocoa...@googlegroups.com
I actually have an answer for this one already :)

http://wiki.github.com/apinstein/phocoa/faq

Alan

Alan Pinstein

unread,
Dec 15, 2009, 9:04:27 PM12/15/09
to phocoa...@googlegroups.com
It's "php names", so table blog => Blog, table my_data => MyData.

Alan

Alan Pinstein

unread,
Dec 15, 2009, 9:04:07 PM12/15/09
to phocoa...@googlegroups.com
Yes, please feel free to update the phocoa/docs/userguide/PHOCOA User
Guide.xml file.

If you do, please read phocoa/docs/userguide/doc-editing.txt and
consider using this gui:

http://www.xmlmind.com/xmleditor/

That's what I built it with.

No need to re-architect the docs, but if you could make improvements
for where you hit troubles that'd be awesome for everyone.

Alan

SwissalpS

unread,
Dec 16, 2009, 6:55:18 AM12/16/09
to phocoa users
the yaml patch doesn't solve the problem for me.

Alan Pinstein

unread,
Dec 16, 2009, 10:26:23 AM12/16/09
to phocoa...@googlegroups.com
You still get the same error?

Did you patch horde/yaml or install syck?

Maybe you patched the wrong horde/yaml? Maybe you have it in multiple
locations?

Alan

SwissalpS

unread,
Dec 16, 2009, 11:13:46 AM12/16/09
to phocoa users
I patched horde/yaml according to the patch you linked to.

still same error message in browser.
log/wf.log contains lines like these:
Dec 16 17:23:55 warn [debug] shared.yaml:: Module 'module_blog' does
not have property 'Blog' declared.
Dec 16 17:23:55 trace [debug] instantiating shared instance id 'Blog'
Dec 16 17:23:55 trace [debug] loading config for shared instance id
'Blog'
Dec 16 17:23:55 trace [debug] SharedConfig:: Setting 'Blog' property,
class => Blog
Dec 16 17:23:55 trace [debug] SharedConfig:: Setting 'Blog' property,
classIdentifiers => blogId
Dec 16 17:23:55 trace [debug] SharedConfig:: Setting 'Blog' property,
selectOnInsert => 1
Dec 16 17:23:55 trace [debug] SharedConfig:: Setting 'Blog' property,
automaticallyPreparesContent =>
Dec 16 17:23:55 warn [debug] shared.yaml:: Module 'module_blog' does
not have property 'paginator' declared.
Dec 16 17:23:55 trace [debug] instantiating shared instance id
'paginator'
Dec 16 17:23:55 trace [debug] loading config for shared instance id
'paginator'
Dec 16 17:23:55 trace [debug] SharedConfig:: Setting 'paginator'
property, modeForm => search
Dec 16 17:23:55 trace [debug] SharedConfig:: Setting 'paginator'
property, pageSize => 25
Dec 16 17:23:55 trace [debug] SharedConfig:: Setting 'paginator'
property, itemPhraseSingular => Blog
Dec 16 17:23:55 trace [debug] SharedConfig:: Setting 'paginator'
property, itemPhrasePlural => Blogs
Dec 16 17:23:55 trace [debug] instantiating a page
Dec 16 17:23:55 general [debug] Internal redirect to: /blog/list
Dec 16 17:23:55 warn [debug] shared.yaml:: Module 'module_blog' does
not have property 'Blog' declared.
Dec 16 17:23:55 trace [debug] instantiating shared instance id 'Blog'
Dec 16 17:23:55 trace [debug] loading config for shared instance id
'Blog'
Dec 16 17:23:55 trace [debug] SharedConfig:: Setting 'Blog' property,
class => Blog
Dec 16 17:23:55 trace [debug] SharedConfig:: Setting 'Blog' property,
classIdentifiers => blogId
Dec 16 17:23:55 trace [debug] SharedConfig:: Setting 'Blog' property,
selectOnInsert => 1
Dec 16 17:23:55 trace [debug] SharedConfig:: Setting 'Blog' property,
automaticallyPreparesContent =>
Dec 16 17:23:55 warn [debug] shared.yaml:: Module 'module_blog' does
not have property 'paginator' declared.
Dec 16 17:23:55 trace [debug] instantiating shared instance id
'paginator'
Dec 16 17:23:55 trace [debug] loading config for shared instance id
'paginator'
Dec 16 17:23:55 trace [debug] SharedConfig:: Setting 'paginator'
property, modeForm => search
Dec 16 17:23:55 trace [debug] SharedConfig:: Setting 'paginator'
property, pageSize => 25
Dec 16 17:23:55 trace [debug] SharedConfig:: Setting 'paginator'
property, itemPhraseSingular => Blog
Dec 16 17:23:55 trace [debug] SharedConfig:: Setting 'paginator'
property, itemPhrasePlural => Blogs
Dec 16 17:23:55 trace [debug] instantiating a page
Dec 16 17:23:55 trace [debug] Initing page list
Dec 16 17:23:55 trace [debug] Loading YAML config: list.yaml
Dec 16 17:23:55 trace [debug] Instantiating object id 'searchBlogForm'
Dec 16 17:23:55 trace [debug] Instantiating object id 'search'
Dec 16 17:23:55 trace [debug] loading properties for id 'search'
Dec 16 17:23:55 trace [debug] Setting 'search' property, label =>
Search
Dec 16 17:23:55 trace [debug] Instantiating object id 'clear'
Dec 16 17:23:55 trace [debug] loading properties for id 'clear'
Dec 16 17:23:55 trace [debug] Setting 'clear' property, label => Clear
Dec 16 17:23:55 warn [debug] Form id: 'searchBlogForm' is unable to
determine the default button for the form. You should set one via
defaultSubmitID to avoid errors in some browsers.

SwissalpS

unread,
Dec 16, 2009, 11:21:57 AM12/16/09
to phocoa users
I installed horde/yaml with pear into a virgin vm
there's only one in usr/shared/php/Horde/Yaml
and one for ruby...guess that won't count as second install.../usr/lib/
ruby/1.8/yaml

# pear list -a
Installed packages, channel __uri:
==================================
(no packages installed)
Installed packages, channel pear.horde.org:
===========================================
Package Version State
Yaml 1.0.1 stable
Installed packages, channel pear.phing.info:
============================================
Package Version State
phing 2.3.3 stable
Installed packages, channel pear.php.net:
=========================================
Package Version State
Archive_Tar 1.3.2 stable
Console_Getopt 1.2.3 stable
Log 1.11.5 stable
Mail 1.1.14 stable
Mail_Mime 1.5.2 stable
Mail_mimeDecode 1.5.1 stable
Net_SMTP 1.3.4 stable
Net_Socket 1.0.9 stable
PEAR 1.7.1 stable
PhpDocumentor 1.4.3 stable
Structures_Graph 1.0.2 stable
Installed packages, channel pear.phpdb.org:
===========================================
Package Version State
propel_generator 1.4.0 stable
propel_runtime 1.4.0 stable
Installed packages, channel pecl.php.net:
=========================================
(no packages installed)

SwissalpS

unread,
Dec 16, 2009, 11:23:24 AM12/16/09
to phocoa users
I'm not using the pear install of propel. Rather a modified version of
propel 1.3

Alan Pinstein

unread,
Dec 16, 2009, 12:01:29 PM12/16/09
to phocoa...@googlegroups.com
Ok, that all looks fine.

wf.log is very verbose; useful for learning the page life cycle.

Alan
>>>>> To post to this group, send email to phocoa-
>>>>> us...@googlegroups.com.

Alan Pinstein

unread,
Dec 16, 2009, 12:04:16 PM12/16/09
to phocoa...@googlegroups.com
This is a pure phocoa issue, see here:

> Trace: #0 /usr/share/php/phocoa/framework/WFObject.php(389):
> WFDynamic->setArrayController('')

See how it's an empty string? That's b/c the YAML parser is ignoring
the real value "#module#Blog" or something like that due to the '#'
comment character.

Well actually it's a HORDE issue since it's their bug.

I don't think you've successfully patched horde.

If it's easy for you to install syck on ubuntu, I'd just do that.
Maybe this?

http://packages.ubuntu.com/karmic/php5-syck

syck is a c-extension rather than a php parser, so it's way faster
anyway, and more accurate (ie doesn't have these stupid bugs).

Alan
>>>>> To post to this group, send email to phocoa-
>>>>> us...@googlegroups.com.

Alan Pinstein

unread,
Dec 16, 2009, 12:04:36 PM12/16/09
to phocoa...@googlegroups.com
Ok that's fine.

SwissalpS

unread,
Dec 16, 2009, 12:44:27 PM12/16/09
to phocoa users
my patched Horde/Yaml/Dumper.php _dumpNode function
git://gist.github.com/258003.git

yes, I'm intending to go the syck way... for the sake of the manual
and completeness I'm checking one option at a time, figuring out what
works and what it takes to make it work.
In this case, I'm ready to declare yaml as "currently not working for
this project" and see what syck has to offer.

SwissalpS

unread,
Dec 16, 2009, 1:24:29 PM12/16/09
to phocoa users
I added this line to Dumper.php
file_put_contents('/home/luke/phocoa_projects/blog/log/test.txt',
'here we are in the patched file');

saved and revisited phocoa.server/blog
there is no file test.txt
---> _dumpNode isn't being called

you are guessing correctly about smth not installed correctly.

what is calling yaml? propel or phocoa directly?

SwissalpS

unread,
Dec 16, 2009, 1:27:16 PM12/16/09
to phocoa users
> what is calling yaml? propel or phocoa directly?
meant: Smarty or a Phocoa class directly

SwissalpS

unread,
Dec 16, 2009, 8:06:14 PM12/16/09
to phocoa users
now I'm back with a propel related problem...

I cleared out my phocoa_projects folder and began for the nth time
from the beginning of the documentation (altered version I have on my
desktop)
in short:
$ phocoa newProject
adding propel and building from mysql database (without timestamp)
$ cd blog/blog/modules
$ phocoa createSkeletonFromPropel

now my patched Horde/Yaml/Dumper.php writes the debugg test.txt file.

when I browse to debian2/blog I get a different error message:
An uncaught exception (PropelException) has occurred:

No connection information in your runtime configuration file for
datasource [blog]

Stack Trace:


Exception: PropelException
Error: No connection information in your runtime configuration file
for datasource [blog]


URL: http://debian2:8080/blog/list
Referrer: (none)

Trace: #0 /usr/share/php/propel/Propel.php(570): Propel::getConnection
('blog', 'write')
#1 /home/luke/phocoa_projects/blog/blog/classes/phocoa_blog/om/
BaseBlogPeer.php(261): Propel::getConnection('blog', 'read')
#2 /home/luke/phocoa_projects/blog/blog/classes/phocoa_blog/om/
BaseBlogPeer.php(243): BaseBlogPeer::doSelectStmt(Object(Criteria),
NULL)
#3 [internal function]: BaseBlogPeer::doSelect(Object(Criteria))
#4 /usr/share/php/phocoa/framework/WFPagination.php(918):
call_user_func(Array, Object(Criteria))
#5 /usr/share/php/phocoa/framework/WFPagination.php(624):
WFPagedPropelQuery->itemsAtIndex(1, 25, Array)
#6 /home/luke/phocoa_projects/blog/blog/modules/blog/blog.php(46):
WFPaginator->currentItems()
#7 /home/luke/phocoa_projects/blog/blog/modules/blog/blog.php(31):
module_blog_list->search(Object(WFPage), Array)
#8 /usr/share/php/phocoa/framework/WFPage.php(1574): module_blog_list-
>noAction(Object(WFPage), Array)
#9 /usr/share/php/phocoa/framework/WFPage.php(1324): WFPage->noAction
()
#10 /usr/share/php/phocoa/framework/WFModule.php(379): WFPage->initPage
('list')
#11 /usr/share/php/phocoa/framework/WFRequestController.php(137):
WFModuleInvocation->execute()
#12 /usr/share/php/phocoa/framework/WFRequestController.php(162):
WFRequestController->handleHTTPRequest()
#13 /usr/share/php/phocoa/framework/WFWebApplication.php(160):
WFRequestController->handleHTTPRequest()
#14 /usr/share/php/phocoa/framework/WFWebApplication.php(18):
WFWebApplication->runWebApplication()
#15 /home/luke/phocoa_projects/blog/blog/wwwroot/index.php(6):
WFWebApplicationMain()
#16 {main}

SwissalpS

unread,
Dec 16, 2009, 8:21:01 PM12/16/09
to phocoa users
my yaml files look somewhat like this:
---
editBlogForm:
class: WFForm
children:
blogId:
class: WFHidden
bindings:
value:
instanceID: Blog
controllerKey: selection
modelKeyPath: blogId
title:
class: WFTextField

in the manual there are a bunch of single quotes:
postDts:
class: 'WFTextField'
bindings:
value:
instanceID: 'Blog'
controllerKey: 'selection'
modelKeyPath: 'postDts'

Wasn't that exactly what the Horde/Yaml/Dumper patch was supposed to
fix?

SwissalpS

unread,
Dec 16, 2009, 8:32:02 PM12/16/09
to phocoa users
> Wasn't that exactly what the Horde/Yaml/Dumper patch was supposed to
> fix?

sorry, it's getting late, I shouldn't be posting anymore as I'm
getting more and more confused.
I've been working on getting phocoa running (with propel support) for
almost for a week now...
...devoted almost all day to it and still no real results...

Maybe an early week-end will help clear my mind and look at the whole
situation from another perspective.

Alan Pinstein

unread,
Dec 16, 2009, 11:05:53 PM12/16/09
to phocoa...@googlegroups.com
Phocoa calls the yaml.

Look in phocoa/framework/util/WFYaml.php it's a very simple wrapper
class.

Alan

On Dec 16, 2009, at 1:27 PM, SwissalpS wrote:

>> what is calling yaml? propel or phocoa directly?
> meant: Smarty or a Phocoa class directly
>

Alan Pinstein

unread,
Dec 16, 2009, 11:07:46 PM12/16/09
to phocoa...@googlegroups.com
Hmm look in the propel-build/runtime-conf.xml and make sure your db
settings are getting in there.

Mine looks like:

<config>
<!-- logging for this project moved to
MyWebApplicationDelegate.php::initialize() -->
<!--
#
# P R O P E L P R O P E R T I E S
#
# Note that you can configure multiple datasources; for example
if your
# project uses several databases.
-->
<propel>
<datasources default="showcaseng">
<datasource id="showcaseng">
<!-- the Propel adapter (usually same as phptype of
connection DSN) -->
<adapter>pgsql</adapter>
<!-- Connection DSN. See PEAR DSN format for other
supported parameters. -->
<connection>

<dsn>pgsql:dbname=mydb;user=mydbuser;host=localhost</dsn>
<classname>DebugPDO</classname>
</connection>
</datasource>
</datasources>
</propel>
</config>


Alan

Alan Pinstein

unread,
Dec 16, 2009, 11:09:45 PM12/16/09
to phocoa...@googlegroups.com
Can't tell from that one -- it's the list view that has the problem.

Oh and maybe you're right; maybe the patch for Horde/YAML has to be in
place when you GENERATE the scaffold or it does them unquoted. So
maybe your horde/yaml is fixed, but you didn't re-run the scaffold
generator? Maybe it isnt' on the read side, but the write side...

Try just going into the search.yaml or list.yaml (forgot which the
scaffold gens) and change the

arrayController: #module#blah

to

arrayController: '#module#blah'

See if that works.

Alan

SwissalpS

unread,
Dec 17, 2009, 6:57:28 AM12/17/09
to phocoa users
thanks Alan, I really appreciate your endurance with me.
here's my rundown
1)$phocoa newProject
name: blog
addPropel: yes
dbName: phocoa_blog
dbUser: phocoa
dbType: mysql
reverse from db: yes
2)$cp blog/blog blog/blogB4fix-schema; #doing cp with Finder for later
comparison and fallback
3)$fix-schema.php
4)$cp blog/blog blog/blogB4skeleton; #doing cp with Finder
5)$cd blog/blog/modules
6)$phocoa createSkeletonFromPropel
Blog
7)$cp blog/blog blog/blogB4FirstVisit; #doing cp with Finder

up to this point there are no error messages in Terminal

I check in list.yaml: all values containing # are enclosed in single
quotes -> seems ok to me
checking runtime-conf.xml I notice a difference to yours (appart from
the mysql bits)
in your listing there is a 'classname' tag which doesn't appear in
mine, but doesn't seem to matter:
<propel>
<datasources default="phocoa_blog">
<datasource id="phocoa_blog">


<!-- the Propel adapter (usually same as phptype of
connection DSN) -->

<adapter>mysql</adapter>


<!-- Connection DSN. See PEAR DSN format for other
supported parameters. -->
<connection>

<!-- propel 1.3 -->

<dsn>mysql:dbname=phocoa_blog;user=phocoa;host=localhost;password=phocoa</
dsn>
<user>phocoa</user>
<!-- propel 1.2 -->
<phptype>mysql</phptype>
<hostspec>localhost</hostspec>
<database>phocoa_blog</database>
<username>phocoa</username>
<password>phocoa</password>
</connection></datasource></dataso.....

Q: when createSkeleton is run, it doesn't actually connect to the db?
just looks up the schema.xml?

if anyone wants to recreate my scenario, here's also my sql:
# This is a fix for InnoDB in MySQL >= 4.1.x
# It "suspends judgement" for fkey relationships until are tables are
set.
SET FOREIGN_KEY_CHECKS = 0;

#-----------------------------------------------------------------------------
#-- blog
#-----------------------------------------------------------------------------

DROP TABLE IF EXISTS `blog`;


CREATE TABLE `blog`
(
`blog_id` INTEGER(10) NOT NULL AUTO_INCREMENT,
`title` VARCHAR(100) NOT NULL,
`post` TEXT NOT NULL,
`post_dts` INTEGER(10) default 0 NOT NULL,
PRIMARY KEY (`blog_id`)
)Type=MyISAM;

# This restores the fkey checks, after having unset them earlier
SET FOREIGN_KEY_CHECKS = 1;

SwissalpS

unread,
Dec 17, 2009, 7:06:03 AM12/17/09
to phocoa users
> Can't tell from that one -- it's the list view that has the problem.
this hits a home-run! I hadn't thought about it before.... so now I
tried

http://phocoa-server/blog/edit

and hey, no errors!
well until I actually fill the fields and attempt to create the entry.
The error message is now shown in a box

It reads: No connection information in your runtime configuration file
for datasource [blog]

Q: this message is generated by propel? If so, I must trace what's
happening in propel and not phocoa.

SwissalpS

unread,
Dec 17, 2009, 9:23:11 AM12/17/09
to phocoa users
found a way to get it working...
duplicated my db 'phocoa_blog' to 'blog'
now it works!

Trying to find the bug I've tried with different dbNames. Seems it
only works if (dbName === tableName) and possibly the project name
must also match.
So now my looming question is: what will I do when I want to access
another table in the same database?
The workaround seems to be to make a new db for each table....which
s****s imo

well I'm off. Got to do something productive after 'wasting' so much
time...

Alan Pinstein

unread,
Dec 17, 2009, 9:38:15 AM12/17/09
to phocoa...@googlegroups.com
> I check in list.yaml: all values containing # are enclosed in single
> quotes -> seems ok to me
> checking runtime-conf.xml I notice a difference to yours (appart from
> the mysql bits)
> in your listing there is a 'classname' tag which doesn't appear in
> mine, but doesn't seem to matter:

that's for debug connection, it's ok if it's not there.

> <propel>
> <datasources default="phocoa_blog">
> <datasource id="phocoa_blog">
> <!-- the Propel adapter (usually same as phptype of
> connection DSN) -->
> <adapter>mysql</adapter>
> <!-- Connection DSN. See PEAR DSN format for other
> supported parameters. -->
> <connection>
> <!-- propel 1.3 -->
>
> <
> dsn
> >mysql:dbname=phocoa_blog;user=phocoa;host=localhost;password=phocoa</
> dsn>
> <user>phocoa</user>
> <!-- propel 1.2 -->
> <phptype>mysql</phptype>
> <hostspec>localhost</hostspec>
> <database>phocoa_blog</database>
> <username>phocoa</username>
> <password>phocoa</password>
> </connection></datasource></dataso.....
>
> Q: when createSkeleton is run, it doesn't actually connect to the db?
> just looks up the schema.xml?

It does not talk to the db, or schema.xml.

Propel can be introspected at runtime to get the schema, and I the
"scaffold generator" talks to a WFModel which is a phocoa-internal
object hierarchy for representing object model. There is an adapter to
build a WFModel from Propel-generated classes. This is the decoupling
I was talking about earlier by which phocoa isn't hard-coded against
propel.

Alan

Alan Pinstein

unread,
Dec 17, 2009, 9:40:31 AM12/17/09
to phocoa...@googlegroups.com
Propel's db connection has a point of decoupling. The connection names
in propel aren't db names, they're connection names. Connections
connect to certain dbs. So you can talk to any table in the db from
the proper connection.

Not exactly sure what issue you're running into here, but just trying
to explain a little.

Maybe this weekend I can build the blog project on my box and share it
with you. I'll see if I have time.

Alan

SwissalpS

unread,
Dec 17, 2009, 11:57:47 AM12/17/09
to phocoa users
Thanks for the info.

>
> Maybe this weekend I can build the blog project on my box and share it  
> with you. I'll see if I have time.
>
I hope you do :-D that'd be swell :-)

I'm staying 'out of trouble' for the moment, getting to know the
framework using just one table, one database.
When I've collected some satisfaction/motivation from the great
results, I'll be back to figure out the depths of the couplings.
Hope that you have had time to look into whatever is causing the
problems, by then.

a grateful but tired and spent Luke

Reply all
Reply to author
Forward
0 new messages