developer.jelix.org is not used any more and exists only for
history. Post new tickets on the Github account.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.
Opened 11 years ago
Closed 11 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: |
Description
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)
Change History (5)
comment:1 Changed 11 years ago by laurentj
- Milestone set to Jelix 1.1.4
comment:2 Changed 11 years ago by bballizlife
comment:3 Changed 11 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 11 years ago by bballizlife
- Resolution set to fixed
- Status changed from new to closed
Note: See
TracTickets for help on using
tickets.
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.