[MODM-161] Bug with index definition Created: 06/Feb/12  Updated: 15/Jun/12

Status: Open
Project: Doctrine MongoDB ODM
Component/s: Mapping Drivers
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Erwann Mest Assignee: Jonathan H. Wage
Resolution: Unresolved Votes: 0
Labels: None
Environment:

MacOS 10.7.2



 Description   

All is there: https://gist.github.com/1682981



 Comments   
Comment by Luis Cordova [ 15/Jun/12 ]

github link has nothing it was removed

Comment by Luis Cordova [ 15/Jun/12 ]

gist is a broken link





[MODM-158] Doctrine\ODM\MongoDB\Mapping\Type\TimestampType should use MongoDate instead of MongoTimestamp Created: 24/Nov/11  Updated: 24/Nov/11

Status: Open
Project: Doctrine MongoDB ODM
Component/s: Mapping Drivers
Affects Version/s: 1.0.0BETA3
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Shane A. Stillwell Assignee: Jonathan H. Wage
Resolution: Unresolved Votes: 0
Labels: None
Environment:

OS 10.7

PHP 5.3.6 with Suhosin-Patch (cli) (built: Sep 8 2011 19:34:00)
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
with Xdebug v2.1.2, Copyright (c) 2002-2011, by Derick Rethans


Attachments: Text File mongodate.patch    

 Description   

When using the @Timestamp mapping type for a class Doctrine uses MongoTimestamp and it creates very incorrect times in the DB. According to PHP documentation, you should not use MongoTimestamp for creating timestamps, instead MongoDate should be used.

I've attached a patch that changes it to MongoDate and this works splendid when you assign a timestamp to a @Timestamp value

	/**
	 * @Field(type="timestamp")
	 */
	protected $created_on;

	/**
	 * @Field(type="timestamp")
	 */
	protected $updated_on;

	public function __construct($options = NULL)
	{
		$this->created_on = $this->updated_on = time();
		parent::__construct($options);
	}





[MODM-151] Missing Annotation class HasLifecycleCallbacks Created: 07/Jul/11  Updated: 07/Jul/11

Status: Open
Project: Doctrine MongoDB ODM
Component/s: Mapping Drivers
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Miloslav "adrive" Kmet Assignee: Jonathan H. Wage
Resolution: Unresolved Votes: 0
Labels: None
Environment:

latest MongoDB ODM from git master repository



 Description   

Annotation class HasLifecycleCallbacks is missing in Doctrine\ODM\MongoDB\Mapping\Annotations






[MODM-150] XSD file for XML mappings is incomplete Created: 07/Jul/11  Updated: 07/Jul/11

Status: Open
Project: Doctrine MongoDB ODM
Component/s: Mapping Drivers
Affects Version/s: 1.0.0BETA3
Fix Version/s: None

Type: Bug Priority: Major
Reporter: alcaeus Assignee: Jonathan H. Wage
Resolution: Unresolved Votes: 1
Labels: None

Attachments: Text File doctrine-mongo-mapping.xsd.patch    

 Description   

The XSD file for XML mappings (http://www.doctrine-project.org/schemas/odm/doctrine-mongo-mapping.xsd) appears to be incomplete:

  • Only document is allowed as root tag, not mapped-superclass or embedded-document
  • The name attribute for the document tag is not allowed according to the XSD file
  • The fieldName, index and unique attributes for the field tag is not allowed according to the XSD file

These are the problems I discovered at the moment, I haven't yet checked for more problems. The XSD file probably needs a bigger update.

Attached is a patch file that adds the missing attributes, I haven't dug into Doctrine enough to create the mapped-superclass or embedded-document tags.






[MODM-152] Single Collection Inheritance mapping does NOT work if the subclasses are in a different namespace Created: 09/Jul/11  Updated: 09/Jul/11

Status: Open
Project: Doctrine MongoDB ODM
Component/s: Mapping Drivers
Affects Version/s: 1.0.0BETA3
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Dayson Pais Assignee: Jonathan H. Wage
Resolution: Unresolved Votes: 0
Labels: None


 Description   

I have described the issue in detail here: https://github.com/doctrine/mongodb-odm/issues/124






[MODM-132] Doctrine\ODM\MongoDB\Mapping\ClassMetaData is loosing "file" property after serialization Created: 18/Mar/11  Updated: 18/Mar/11

Status: Open
Project: Doctrine MongoDB ODM
Component/s: Mapping Drivers
Affects Version/s: 1.0.0BETA3
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Andrei S Assignee: Jonathan H. Wage
Resolution: Unresolved Votes: 0
Labels: None


 Description   

After ClassMetaData is awakened it looses the "file" property and that breaks our File model.
File::count() returns 0

I dumped ClassMetaData object with caching enabled and disabled. Here's the diff:

146c146
< [file] =>

> [file] => file
149a150,180
> [0] => Array
> (
> [keys] => Array
> (
> [uploaded_at] => 1
> )
>
> [options] => Array
> (
> [safe] => true
> [unique] =>
> )
>
> )
>

The first line is the missing file value. The second block appears to be missing indexes but I'm guessing this information should not be serialized.






[MODM-177] mapping import with multiple schema Created: 02/Dec/13  Updated: 02/Dec/13

Status: Open
Project: Doctrine MongoDB ODM
Component/s: Mapping Drivers
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Alexandre PIEL Assignee: Jonathan H. Wage
Resolution: Unresolved Votes: 0
Labels: None


 Description   

I am importing the structure of my database by using doctrine:mapping:import
When I run doctrine:generate:entities I get the error: Invalid mapping file

The exception come from the following code in the function getElement l.105 if the class Doctrine\Common\Persistence\Mapping\Driver\FileDriver

if (!isset($result[$className]))

{ throw MappingException::invalidMappingFile($className, str_replace('\\', '.', $className) . $this->locator->getFileExtension()); }

When I look more in details we have

$clasName = "Company\Eg\Entity\Schema\table"

And $result is:

array(1) {
["Company\Eg\Entity\Schema.table"]=>
array(5) {
(...)

I am using PostgreSQL with multiple schemas for a single database.






[MODM-168] Can't Use Custom Repository Class for Embedded Doc When Using YAML Driver Created: 29/Jul/12  Updated: 29/Jul/12

Status: Open
Project: Doctrine MongoDB ODM
Component/s: Mapping Drivers
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Isaac Foster Assignee: Jonathan H. Wage
Resolution: Unresolved Votes: 0
Labels: None


 Description   

When using the Yaml driver the ClassMetadata generation process won't create and use the indicated custom repository class for an embedded document. From what I can see digging into the actual code, it will work when using the Annotations or XML drivers, but in the Yaml driver the call to setCustomRepositoryClass is inside of a conditional that only gets entered if the document type is 'document'.

I'm not completely sure, but from what I can see elsewhere in the code, it looks like mapped superclasses should also be able to have a custom repository class, but can't when using the Yaml driver.

So I reckon what would work would be to change the code as indicated below:

<<EXISTING CODE>>
//Doctrine/ODM/MongoDb/Mapping/Driver/YamlDriver.php, line 66
if ($element['type'] == 'document') {
if (isset($element['repositoryClass']))

{ $class->setCustomRepositoryClass($element['repositoryClass']); }

} elseif ($element['type'] === 'mappedSuperclass')

{ $class->isMappedSuperclass = true; }

elseif ($element['type'] === 'embeddedDocument')

{ $class->isEmbeddedDocument = true; }

<<TO THIS>>
if (isset($documentAnnot->repositoryClass))

{ $class->setCustomRepositoryClass($element['repositoryClass']); }




Generated at Thu Jul 31 11:38:47 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.