Today we noticed that on some propel generated models the function retrieveByPKs was missing.
We found out that this was because of the fact that retrieveByPKs is only generated by Propel if there is only a single PrimaryKey!
Today we noticed that on some propel generated models the function retrieveByPKs was missing.
We found out that this was because of the fact that retrieveByPKs is only generated by Propel if there is only a single PrimaryKey!
Hello,
it's been a while since I posted on my dev blog, real blog or at this site.
I had little spare time the past months, and so I focused on rewriting this page. Since that new page has a different database format I had to convert lots of data - which isn't done, yet. So if you inquery any problems glitches with the site - please comment or send via email!
Regards, Jan
As you set up your routing.xml with some route like that:
<route name="[strong]unnamed_ticket_view[/strong]"
pattern="[strong]^/ticket/(id:\d+)/$[/strong]" module="Tickets" action="View" />
You can easily create links directly to that with the following code (in your
templates):
echo '<a href="'.$ro->gen("[strong]unnamed_ticket_view[/strong]", array("[strong]id[/strong]" => [strong]12[/strong]))
.'">'.htmlspecialchars("MyLink").'</a>';
This will create a link MyLink with the target
/ticket/12/, nice, isn't it? :)
Once you generated your myproject-conf.php and myproject-classmap.php, you'll notice and copy and paste them into your app/config-folder you'll maybe want to set user and password for a specific AgaviPropelDatabase.
<?xml version="1.0" encoding="UTF-8"?>
<configurations xmlns="http://agavi.org/agavi/1.0/config">
<configuration environment="development">
<databases default="[strong]mydb[/strong]">
<database name="[strong]mydb[/strong]" class="AgaviPropelDatabase">
<parameter name="config">
%core.app_dir%/config/[strong]myproject[/strong]-conf.php
</parameter>
<parameter name="overrides">
<parameter name="connection">
<dsn>mysql:dbname=[strong]mydb[/strong];host=[strong]localhost[/strong]</dsn>
<parameter name="user">root</parameter>
<parameter name="password"></parameter>
</parameter>
</parameter>
</database>
</databases>
</configuration>
</configurations>
Here you also can change the dns-entry to match different sql servers!
Your runtime-conf.xml for propel looks like that:
<?xml version="1.0" encoding="UTF-8"?>
<config>
<propel>
<datasources default="[strong]mydb[/strong]">
<datasource id="[strong]mydb[/strong]">
<!--
this ID must match <database name="">
in schema.xml
-->
<adapter>mysql</adapter>
<!--
sqlite, mysql, myssql, oracle, or pgsql
-->
<connection>
<dsn>mysql:dbname=[strong]mydb[/strong];host=localhost</dsn>
</connection>
</datasource>
</datasources>
</propel>
</config>
Today I want to announce a new release of DJson. The 1.4.1 features one little bug fix for loading files, with numbers (especially the 0) as element.
Also this update of course includes the changes from the 1.4 release: way faster caching. With 1.4 I managed to use the cache memory based and without journal (which is actually not needed here), which made the api-tests like 100 times faster. DJson is now really lightning fast!
Head over to the
official DJson page or directly to the djson 1.4.1 download.