is not used any more and exists only for history. Post new tickets on the Github account. n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Opened 12 years ago

Closed 12 years ago

#980 closed bug (fixed)

jelix-script createdao should'nt validate fieldname with "-"

Reported by: RiderCrazy Owned by:
Priority: normal Milestone: Jelix 1.1.4
Component: jelix-scripts Version: 1.1.3
Severity: minor Keywords:
Cc: Blocked By:
Blocking: Documentation needed: no
Hosting Provider: Php version:


Php throw an error when you use a syntax like $record->field-name (for exemple). If you correct exemple.dao.xml to use $record->field_name, jDaoProperty throw an error (condition line 96 in jDaoProperty.class.php).

So, if we really can't use field name with "-", maybe jelix-script createdao shouldn't validate that.

Attachments (1)

ticket_980.diff (674 bytes) - added by bballizlife 12 years ago.
For 1.1.x

Download all attachments as: .zip

Change History (5)

comment:1 Changed 12 years ago by laurentj

  • Milestone set to Jelix 1.1.4

comment:2 Changed 12 years ago by bballizlife

Well if your database allow you to use "-" in the name of the fields, i don't think we should forbid that.

What we could do is to "escape" the name attribute instead of generating the same value as the one is the fieldname attribute.

See my patch for what could be done.

Changed 12 years ago by bballizlife

For 1.1.x

comment:3 Changed 12 years ago by laurentj

ok for me, but I think it's better to replace '-' by '_'.

Land it also in the trunk.

comment:4 Changed 12 years ago by bballizlife

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.