Regenerate!

at 2007-01-16 in HomepageRFCs by friebe (0 comments)

On a short note: If you update your XP checkout to SVN head and are using classes generated by the O/R mapping generator (ports/dist/databases/util/classgen), you will have to regenerate these classes or else they will not work any longer!

The change in the rdbms.Peer class' type member was introduced with the implementation of RFC #0107.

If you have made manual changes to your database classes after generating them (which is something we do not recommend), the only thing you have to change is in your class' static initializer.

Here's how it looked before:

  $peer->setTypes(array(
'job_id' => '%d',
'title' => '%s',
'valid_from' => '%s',
'expire_at' => '%s'
));

Here's the new version:
  $peer->setTypes(array(
'job_id' => array('%d', FieldType::NUMERIC, FALSE),
'title' => array('%s', FieldType::VARCHAR, FALSE),
'valid_from' => array('%s', FieldType::VARCHAR, TRUE),
'expire_at' => array('%s', FieldType::DATETIME, FALSE),
));



Subscribe

You can subscribe to the XP framework's news by using RSS syndication.


Categories

News
General
PHP5
Announcements
RFCs
Further reading
Examples
Editorial
EASC
Experiments
Unittests
Databases
5.8-SERIES
Unicode
Language
5.9-SERIES

Related

Find related articles by a search for «Regenerate!».