Ticket #648 (new enhancement)

Opened 2 months ago

Last modified 2 months ago

class dao factory , bug when generating parameter with default value

Reported by: samtahRam Assigned to: samtahRam
Priority: normal Milestone:
Component: jelix:dao Version: 1.0.4
Severity: major Keywords:
Cc: Php version:
Review: Hosting Provider:
Documentation needed: 0 Blocking:

Description

i want to attract your attention about a bug when we declare a method in the xml file of which parameters are initialized with default values. indeed, after the generating process, the parameters type are systematically in string, the others types like boolean aren't set at all. For instances, in our xml

<method type="php" name="test">

<parameter name="a" default="null" /> <parameter name="b" default="false" /> <body><![CDATA[ ]]></body>

</method>

the method that we obtain is something like this

public function test ($a='null',$b='false'){

}

Change History

07/15/08 10:10:55 changed by laurentj

  • priority changed from high to normal.
  • type changed from bug to enhancement.

This is not a bug. It generates string because there is no way here to know the type of the default value. jDao cannot guess if you mean "null" or null.

We could support other attributes for specific type of values...

Download in other formats: Comma-delimited Text Tab-delimited Text RSS Feed