Martynas Jusevicius | 8 Jun 2009 13:01
Picon

Re: NestedSetPeerBuilder bug?

Hey,

this bug is still not fixed.
My left/right columns are called simply Left and Right, so I guess
they class with SQL reserved words if they are not in quotes.
It is a very easy fix though.

Martynas
whatsup.lt

On Sun, Aug 17, 2008 at 10:53 AM, Martynas
Jusevicius<martynas.jusevicius <at> gmail.com> wrote:
> Er, no, I fixed it :) It was the shiftRLValues() method, it did not
> properly escape column names in SQL. So I hacked/fixed lines 1608/1609
> like this:
>
>                \$leftUpdateCol = self::LEFT_COL; // substr(self::LEFT_COL,
> strrpos(self::LEFT_COL, '.') + 1);
>                \$rightUpdateCol = self::RIGHT_COL; //substr(self::RIGHT_COL,
> strrpos(self::RIGHT_COL, '.') + 1);
>
> The original code commented. Now it works.
>
> Martynas
>
> On Sat, Aug 16, 2008 at 11:55 PM, Heltem <eofredj <at> gmail.com> wrote:
>> Hi,
>>
>> Can you provide the full message you got ?
>> And the sample to reproduce it myself ...
(Continue reading)

Heltem | 9 Jun 2009 01:13
Picon

Re: NestedSetPeerBuilder bug?

Seems to work with MySQL.
But did you test this syntax with all rdbms adapter ?
Before we can spread this fix, we must be sure that do not break other rdbms.

Heltem

Martynas Jusevicius a écrit :
Hey, this bug is still not fixed. My left/right columns are called simply Left and Right, so I guess they class with SQL reserved words if they are not in quotes. It is a very easy fix though. Martynas whatsup.lt On Sun, Aug 17, 2008 at 10:53 AM, Martynas Jusevicius<martynas.jusevicius <at> gmail.com> wrote:
Er, no, I fixed it :) It was the shiftRLValues() method, it did not properly escape column names in SQL. So I hacked/fixed lines 1608/1609 like this:                \$leftUpdateCol = self::LEFT_COL; // substr(self::LEFT_COL, strrpos(self::LEFT_COL, '.') + 1);                \$rightUpdateCol = self::RIGHT_COL; //substr(self::RIGHT_COL, strrpos(self::RIGHT_COL, '.') + 1); The original code commented. Now it works. Martynas On Sat, Aug 16, 2008 at 11:55 PM, Heltem <eofredj <at> gmail.com> wrote:
Hi, Can you provide the full message you got ? And the sample to reproduce it myself ... Regards, Heltem Martynas Jusevicius a écrit :
Hi, I tried nested set support in 1.3RC1, and immediately got the "UPDATE failed ... syntax error near ... " MySQL error when saving the tree. The query causing the trouble was: UPDATE Table SET `LEFT` = LEFT + 2 WHERE Table.LEFT>=2 I think there is a problem in PHP5NestedSetPeerBuilder shiftRLValues() method.
------------------------------------------------------ http://propel.tigris.org/ds/viewMessage.do?dsForumId=1097&dsMessageId=2360266 To unsubscribe from this discussion, e-mail: [users-unsubscribe <at> propel.tigris.org].

Tony Bibbs | 23 Jun 2009 16:42
Gravatar

PHP 5.3 Due out Thursday. Namespaces?

The PHP mailing list had a recent post indicating that aside from any surprises they intend to release PHP 5.3 stable into the wild. 

This brings back to the forefront the issue of namespace support in Propel and I'd like to see us release a namespace compatible release not too far after 5.3 is released.

I've been using the implementation internally for a few months now and feel pretty good with it.  One feature related to namespaces that we talked about was the ability to override namespaces on a per-table basis.  A couple months ago I indicated that doing that configuration in the schema.xml didn't make much sense because, to me and a few other devs, the schema.xml is all about database meta-data. I've since put that ability into the .properties file.  I know there was discussion about changing the INI format to XML but I think we agreed to take that on as a separate effort. 

That said, the only uncommitted code I have allows you to override the namespace for a set of models with the following syntax (this is a working sample I'm using):

propel.table.tag.namespace.base = ${propel.namespace.pluginbase}\tagging
propel.table.tag.output.dir = plugins/tagging/models

Starting with the second line,  it specifies the output directory relative to propel.output.dir

The first line sets the namespace for a table called "tag" which is based on the following default values:
propel.namespace.enabled = true
propel.namespace.base = \MyProject
propel.namespace.pluginbase = ${propel.namespace.base}\Plugin
propel.namespace.default.om = Model
propel.namespace.default.peer = Model
propel.namespace.default.map = Model

This essentially makes it a snap for people developing plugin-based packages or bigger non-plugin based systems that would like to better organized their model objects.

So for the Dev's I'd like some comments/feedback on this and, if not argument, a green light to commit this.

For you folks out in user-land, I'd like to encourage testing of namespace support (minus the namespace override above) once 5.3 hits the street.

--
Tony Bibbs
Phone: 515.554.8046
Twitter, Skype, Facebook: tonybibbs
Web: http://www.tonybibbs.com
        http://www.apteno.net

Hans Lellelid | 24 Jun 2009 01:20

Re: [propel-dev] PHP 5.3 Due out Thursday. Namespaces?

Hi folks,

Tony Bibbs wrote:
> The PHP mailing list had a recent post indicating that aside from any 
> surprises they intend to release PHP 5.3 stable into the wild. 
>
> This brings back to the forefront the issue of namespace support in 
> Propel and I'd like to see us release a namespace compatible release 
> not too far after 5.3 is released.
>
> I've been using the implementation internally for a few months now and 
> feel pretty good with it.  One feature related to namespaces that we 
> talked about was the ability to override namespaces on a per-table 
> basis.  A couple months ago I indicated that doing that configuration 
> in the schema.xml didn't make much sense because, to me and a few 
> other devs, the schema.xml is all about database meta-data. I've since 
> put that ability into the .properties file.  I know there was 
> discussion about changing the INI format to XML but I think we agreed 
> to take that on as a separate effort. 
>
> That said, the only uncommitted code I have allows you to override the 
> namespace for a set of models with the following syntax (this is a 
> working sample I'm using):
>
> propel.table.tag.namespace.base = ${propel.namespace.pluginbase}\tagging
> propel.table.tag.output.dir = plugins/tagging/models
>
> Starting with the second line,  it specifies the output directory 
> relative to propel.output.dir
>
> The first line sets the namespace for a table called "tag" which is 
> based on the following default values:
> propel.namespace.enabled = true
> propel.namespace.base = \MyProject
> propel.namespace.pluginbase = ${propel.namespace.base}\Plugin
> propel.namespace.default.om <http://propel.namespace.default.om> = Model
> propel.namespace.default.peer = Model
> propel.namespace.default.map = Model
>
> This essentially makes it a snap for people developing plugin-based 
> packages or bigger non-plugin based systems that would like to better 
> organized their model objects.
>
> So for the Dev's I'd like some comments/feedback on this and, if not 
> argument, a green light to commit this.
>
> For you folks out in user-land, I'd like to encourage testing of 
> namespace support (minus the namespace override above) once 5.3 hits 
> the street.

Does anyone have any strong opinion on this?   Personally it seems a bit 
awkward to do this in the ini file.  While I agree that schema.xml is 
really for database stuff, it's currently the only data structure we 
have that represents things in a sensible per-table sort of way.  We do 
also have some attributes in there that describe the *mapping* and not 
the database -- e.g. the peerName/phpName the inheritance stuff is all 
related to the generated objects and not the database.  However, I agree 
with the sentiment of separating out PHP directives from database 
directives, so I'm not particularly passionate about either argument :)

Hans

------------------------------------------------------
http://propel.tigris.org/ds/viewMessage.do?dsForumId=1097&dsMessageId=2364744

To unsubscribe from this discussion, e-mail: [users-unsubscribe <at> propel.tigris.org].

Tony Bibbs | 30 Jun 2009 19:43
Gravatar

Re: [propel-dev] Re: PHP 5.3 Due out Thursday. Namespaces?

Ok, so 5.3 got dropped today.  I'd like those of you in the Propel community to take a look at 5.3 and the SVN snapshot.

One wrinkle, however, is this set of standards agreed upon but quite a few prominent PHP'ers:

http://news.php.net/php.standards/2

We'll probably want to work those into Propel but I'd like to hold off doing anything with it until we get feedback on my original email and Hans' response below.

--Tony

On Tue, Jun 23, 2009 at 6:20 PM, Hans Lellelid <hans <at> velum.net> wrote:

Hi folks,

Tony Bibbs wrote:
> The PHP mailing list had a recent post indicating that aside from any
> surprises they intend to release PHP 5.3 stable into the wild.
>
> This brings back to the forefront the issue of namespace support in
> Propel and I'd like to see us release a namespace compatible release
> not too far after 5.3 is released.
>
> I've been using the implementation internally for a few months now and
> feel pretty good with it.  One feature related to namespaces that we
> talked about was the ability to override namespaces on a per-table
> basis.  A couple months ago I indicated that doing that configuration
> in the schema.xml didn't make much sense because, to me and a few
> other devs, the schema.xml is all about database meta-data. I've since
> put that ability into the .properties file.  I know there was
> discussion about changing the INI format to XML but I think we agreed
> to take that on as a separate effort.
>
> That said, the only uncommitted code I have allows you to override the
> namespace for a set of models with the following syntax (this is a
> working sample I'm using):
>
> propel.table.tag.namespace.base = ${propel.namespace.pluginbase}\tagging
> propel.table.tag.output.dir = plugins/tagging/models
>
> Starting with the second line,  it specifies the output directory
> relative to propel.output.dir
>
> The first line sets the namespace for a table called "tag" which is
> based on the following default values:
> propel.namespace.enabled = true
> propel.namespace.base = \MyProject
> propel.namespace.pluginbase = ${propel.namespace.base}\Plugin
> propel.namespace.default.om <http://propel.namespace.default.om> = Model
> propel.namespace.default.peer = Model
> propel.namespace.default.map = Model
>
> This essentially makes it a snap for people developing plugin-based
> packages or bigger non-plugin based systems that would like to better
> organized their model objects.
>
> So for the Dev's I'd like some comments/feedback on this and, if not
> argument, a green light to commit this.
>
> For you folks out in user-land, I'd like to encourage testing of
> namespace support (minus the namespace override above) once 5.3 hits
> the street.

Does anyone have any strong opinion on this?   Personally it seems a bit
awkward to do this in the ini file.  While I agree that schema.xml is
really for database stuff, it's currently the only data structure we
have that represents things in a sensible per-table sort of way.  We do
also have some attributes in there that describe the *mapping* and not
the database -- e.g. the peerName/phpName the inheritance stuff is all
related to the generated objects and not the database.  However, I agree
with the sentiment of separating out PHP directives from database
directives, so I'm not particularly passionate about either argument :)

Hans

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Propel Development" group.
To post to this group, send email to propel-development <at> googlegroups.com
To unsubscribe from this group, send email to propel-development+unsubscribe <at> googlegroups.com
For more options, visit this group at http://groups.google.nl/group/propel-development?hl=en
-~----------~----~----~----~------~----~------~--~---




--
Tony Bibbs
Phone: 515.554.8046
Twitter, Skype, Facebook: tonybibbs
Web: http://www.tonybibbs.com
        http://www.apteno.net

benjaminsrj | 30 Jun 2009 15:06
Picon

[propel] Question about clearInstancePool()

Hi everybody,

I'm using Propel to do my project. When I do a select after set, this
problem will appear:
The object instances contain the Array with *RECURSION* something (which is
bold in the code below). I use clearInstancePool(), the problem is resolved.
But I want to ask when and how this problem will appear.

Structure Object ( [rank:private] => 0 [id_structure:protected] => 1
[id_struct_family:protected] => 1 [id_project:protected] => 1
[structure_name:protected] => Centre roulier roro3 - bigue de 650t
fondations [code:protected] => T10 [construction_date:protected] => 1976
[linear:protected] => 240 [ted:protected] => 1250
[attendance_level:protected] => 1 [comments:protected] => [status:protected]
=> 2 [status_indd:protected] => 1 [calc_irdo:protected] => 0
[calc_irso:protected] => 0 [calc_irgo:protected] => 0
[calc_irgc_max:protected] => 0 [aCstStructureFamily:protected] =>
CstStructureFamily Object ( [id_struct_family:protected] => 1
[family_name:protected] => Bigues [collCstDangers:protected] =>
[lastCstDangerCriteria:private] => [collStructures:protected] => Array ( [0]
=> Structure Object *RECURSION* ) [lastStructureCriteria:private] =>
[alreadyInSave:protected] => [alreadyInValidation:protected] =>
[validationFailures:protected] => Array ( ) [_new:private] =>
[_deleted:private] => [modifiedColumns:protected] => Array ( ) )
[aProject:protected] => [collInddIndrs:protected] =>
[lastInddIndrCriteria:private] => [collSystematicActions:protected] =>
[lastSystematicActionCriteria:private] => [singleTotalcost:protected] =>
[alreadyInSave:protected] => [alreadyInValidation:protected] =>
[validationFailures:protected] => Array ( ) [_new:private] =>
[_deleted:private] => [modifiedColumns:protected] => Array ( ) ) 

Thanks
--

-- 
View this message in context: http://www.nabble.com/Question-about-clearInstancePool%28%29-tp24271527p24271527.html
Sent from the propel - users mailing list archive at Nabble.com.

------------------------------------------------------
http://propel.tigris.org/ds/viewMessage.do?dsForumId=1097&dsMessageId=2366700

To unsubscribe from this discussion, e-mail: [users-unsubscribe <at> propel.tigris.org].


Gmane