Doctrine ORM Version 1.2.3 Released

Posted about 1 year ago by jwage

Today I am happy to be able to finally announce the release of the Doctrine 1.2.3 maintenance version. It is a little late but it contains dozens of fixes and a few improvements too! You can upgrade now by downloading from one of the sources below:

Pear Package Download

You can directly download the PEAR package file here. You can manually extract the code or you can install the PEAR package file locally.

$ pear install /path/to/Doctrine-1.2.3.tgz

Checkout from Subversion

$ svn co http://svn.doctrine-project.org/tags/1.2.3

Install via PEAR

$ pear install pear.doctrine-project.org/Doctrine-1.2.3.tgz

You can find a list of the releases notes for this version below:

Bugs

  • [DC-349] - Issue with quoting of booleans in Oracle
  • [DC-363] - Multiple connections and i18n
  • [DC-391] - Connection rollback exception hides real exception
  • [DC-399] - Doctrine_Record::unlink() causes records to be deleted
  • [DC-405] - isset() via array interface does not "see" virtual property defined inside the model definition
  • [DC-439] - Import of table with (silly) name "index"
  • [DC-470] - [PATCH] Search : wrong connection used for some queries when multiples connections are defined
  • [DC-558] - CLONE -generate-migrations-diff is producing bogus migrations (drops the whole database)
  • [DC-583] - MSSQL Server: No accounting for max varchar size when creating columns.
  • [DC-584] - MSSQL Server: Cannot alter / drop columns which have indexes or constraints applied to them
  • [DC-594] - When using a combination of: a group by field referencing a table in a relation, a join to a different table via a many type relation and a limit clause, doctrine creates a broken query then throws an exception
  • [DC-613] - Doctrine_Record::copy() ignores IDENTIFIER_SEQUENCE for NULLifying the id field on copy
  • [DC-620] - Unserialize does not add entity to the table entitymap
  • [DC-621] - Doctrine_Inflector :: urlize changed behaviour
  • [DC-641] - undefined method Doctrine_Manager::getExtensionsClasses()
  • [DC-647] - Error in Doctrine_Manager#_buildDsnPartsArray()
  • [DC-650] - SoftDelete sets "default" => null for deleted_at field, causing MSSQL to silently create a Default Constraint which in turns causes Migrations to fail when reverting
  • [DC-656] - Endless loop when using HYDRATE_SINGLE_SCALAR and Oracle OCI adapter Doctrine
  • [DC-657] - EXISTS not correctly parsed if there's no space between keyword and the open bracket
  • [DC-658] - _setPage in Doctrine_Pager is set to Private method
  • [DC-662] - Obsolete Doctrine::getTable() call in Template_Listener_Sluggable
  • [DC-663] - Doctrine_Table::createQuery creates a query with the default connection instead of the current connection
  • [DC-664] - PATCH: Docrine_Record _isValueModified should not type check when comparing integers
  • [DC-669] - listTableIndexes() return an empty array with doctrine-1.2.2
  • [DC-671] - Record could be saved, even tough a NotNull column is null
  • [DC-673] - Doctrine_Export::dropForeignKey() doesn't format foreign key names
  • [DC-675] - Doctrine_Connection_Mssql charset problem
  • [DC-677] - Incorrect property uset before Collection serialize
  • [DC-678] - Need case-insensitive checks for dupes in the $options['indexes'] array
  • [DC-681] - Command-line option rebuild-db is touching the models
  • [DC-683] - orderBy many field defined in yml files doesnt work
  • [DC-685] - Invalid conditions in Import/Mysql.php
  • [DC-687] - Doctrine_Inflector::unaccent replaces UTF8-Chars - 0 with å, 1 with aa
  • [DC-688] - data-load don't work when the primary key is a string
  • [DC-691] - No sequence_id increment after fixtures loaded, while setting their ids
  • [DC-694] - Doctrine_Record::replace() discards Doctrine_Expression values, uses empty value instead
  • [DC-695] - Fixtures created badly when primary key is not autonumber
  • [DC-696] - Sluggable behavior doesn't work properly with french accents in utf8
  • [DC-698] - Record::link method does not work with setting null one-to-one
  • [DC-699] - DC292 test doesn't pass due to missing 'migrations' directory
  • [DC-703] - [PATCH] Doctrine_Connection_Oracle unquoted query aliases in _createLimitSubquery
  • [DC-705] - synchronizeWithArray does not properly set foreign key validation
  • [DC-706] - Subqueries do not work in select
  • [DC-709] - Column comments are not escaped
  • [DC-712] - [pgsql] missing quoteIdentifier() on "alter table" queries
  • [DC-714] - Fatal error(Call to a member function quoteIdentifier() on a non-object), on batchUpdateIndex(), file search.php on line 246
  • [DC-715] - Doctrine_Tree_NestedSet::fetchRoots does not return roots with no branches.
  • [DC-745] - Exported foreign keys names are not formatted with attribute FKNAME_FORMAT
  • [DC-764] - Major->please.....Value of Primary key from sequence in Postgres table NOT being set (although sequence gets incremented)
  • [DC-794] - findBy issue with field names containing "Or"
  • [DC-800] - PostgreSQL does not have LOCATE expressions
  • [DC-832] - PostgreSQL - lastInsertId fails because sequence name on table with column alias on primary key does not work [+patch]

Improvement

  • [DC-364] - Adding the fieldName to mutator/accessor methods
  • [DC-538] - Doctrine_Table::enumIndex() and Doctrine_Table::enumValue() should return easily distinguishable value (e.g. false) when index/value is not found
  • [DC-670] - Doctrine/Collection: toHierarchy() accepts not only NestedSet
  • [DC-697] - Doctrine Support of custom enum types in Pgsql
  • [DC-826] - Doctrine_Collection::replace() EASY PATCH!

New Feature

  • [DC-626] - Subqueries in HAVING
  • [DC-813] - Add ability to register a custom hydrator as a class instance instead of a class name

If you encounter any issues with this version please report them on the Doctrine Jira issue tracker.


Comments (9) [ add comment ]

packaging changes Posted by Christof Damian about about 1 year ago.

I am updating the Fedora/RHEL RPM at the moment and was wondering why these files are missing from the tgz:

  • CHANGELOG
  • COPYRIGHT
  • tests

Not a big problem, just wondering

@Christof Posted by jwage about about 1 year ago.

I switched to use phing to build this package and I didn't include these files. If it is a problem I can re-build with the files.

@jwage Posted by Christof Damian about about 1 year ago.

Not a problem and no need to rebuild.

But if it is not a problem for you, you can include them in the next release. It is useful to run the test suite when building a package, to check if everything works OK. And any documentation / readmes / copyright files are good too.

nesting-behaviors Posted by barii about about 1 year ago.

http://www.doctrine-project.org/projects/orm/1.2/docs/manual/behaviors/en#nesting-behaviors

"The above example of nesting behaviors is currently broken in Doctrine. We are working furiously to come up with a backwards compatible fix. We will announce when the fix is ready and update the documentation accordingly."

I have tried the example, wrote a row into the table, and worked. Is there any problem with it? What is that?

thanks

Migration continues to drop entire database with YAML-YAML Posted by Andrew Coulton about about 1 year ago.

It seems that the fix for [DC-558] committed in this release still causes the entire database to be dropped when migrating from YAML to YAML and using model prefixes as reported in [DC-755].

CLI: build-all-relaod fails Posted by patrick about about 1 year ago.

using doctrine_cli from the Sandbox build-all-relaod only dump and create the database, no models are generated and no table in the database. Creating models and tables manually works, but load-data commits "Data was successfully loaded" but no data was loaded. Paths and everything ist corrent set uo and work with 1.2.2 Any Help?

@CLI: build-all-reload fails Posted by Stratocaster about about 1 year ago.

I also noticed that build-all-reload directive doesn't generate models. I checked earlier versions of Doctrine, and it seems there were some changes in Doctrine_Task_RebuildDb. The current version (1.2.3) of 'Doctrine_Task_RebuildDb' class is missing a call to Doctrine_Task_GenerateModelsYaml class.

So I added it myself, so class looks like this:

class Doctrine_Task_RebuildDb extends Doctrine_Task { public $description = 'Drops and re-creates databases', $requiredArguments = array(), $optionalArguments = array();

public function __construct($dispatcher = null)
{
    parent::__construct($dispatcher);

    $this->dropDb = new Doctrine_Task_DropDb($this->dispatcher);
    $this->models = new Doctrine_Task_GenerateModelsYaml($this->dispatcher); // ADDED BY STRATOCASTER
    $this->createDb = new Doctrine_Task_CreateDb($this->dispatcher);
    $this->createTables = new Doctrine_Task_CreateTables($this->dispatcher);

    // UPDATED BY STRATOCASTER
    $this->requiredArguments = array_merge($this->requiredArguments, $this->dropDb->requiredArguments, $this->models->requiredArguments, $this->createDb->requiredArguments, $this->createTables->requiredArguments);
    $this->optionalArguments = array_merge($this->optionalArguments, $this->dropDb->optionalArguments, $this->models->optionalArguments, $this->createDb->optionalArguments, $this->createTables->optionalArguments);
}

public function execute()
{
    $this->dropDb->setArguments($this->getArguments());
    $this->dropDb->execute();

    // ADDED BY STRATOCASTER
    $this->models->setArguments($this->getArguments());
    $this->models->execute();

    $this->createDb->setArguments($this->getArguments());
    $this->createDb->execute();

    $this->createTables->setArguments($this->getArguments());
    $this->createTables->execute();
}

}

Thanks Stratocaster Posted by Ambi about 11 months ago.

Thanks a lot!

Thanks STRATOCASTER Posted by indiekiduk about 16 days ago.

Just tracked this bug down too and then found your post. This bug is still present in 1.2.4 and to fix it I replaced RebuildDb.php from an earlier version that calls buildAll which contains the models, createDB and createTables methods.

Create Comment