The problem of a database not existing has cropped up everywhere, in the dev mailing list, in the forum (several threads), on IRC and even on trac (#1066).
This was my mistake for i forgot to tell alpha-users to rebuild their model in the log of changeset 2484. My question is: should i do something about that? Is that possible to change the log of an old svn commit? Or should i add an exception if that constant DATABASE_NAME does not exist, throwing an exception which is more informative than "Database "" does not exist"? (probably the wisest solution...) Or is there some sort of changelog on which i should advise people to rebuild their model after upgrading to version 2484? Or is there nothing to do, since we expect people using the alpha to search the forum and read the dev mailing list? Please give me your advice. == Olivier Le 25 oct. 06 à 19:47, Charles Hilditch a écrit : > > sfDatabaseException - 'Database "" does not exist' > (I'm using r2519) > > Regarding SF_SYMFONY_LIB_DIR/helper/ObjectHelper.php > _get_values_for_object_select_tag which calls > sfContext->retrieveObjects outlined here: > http://www.symfony-project.com/trac/changeset/2484 > > The sfContext->retrieveObjects method gets $class::DATABASE_NAME > from a > propel class although the propel class may not be a peer class so the > database name cannot be retrieved. > > For BC something like this may be needed: > $db_name = defined("$class::DATABASE_NAME") ? > "$class::DATABASE_NAME" : > $class . "Peer::DATABASE_NAME"; > return > $this->databaseManager->getDatabase(constant($db_name))- > >retrieveObjects($class, > $peerMethod); > > > ...or maybe check the passed in $class is a peer class > if( ! preg_match('/Peer$/',$class) ) { > $class .= 'Peer'; > } > return > $this->databaseManager->getDatabase(constant > ("$class::DATABASE_NAME"))->retrieveObjects($class, > $peerMethod); > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en -~----------~----~----~----~------~----~------~--~---
