Open quazardous opened 11 years ago
@quazardous Can you point to specific part of those docs that describe what you are saying? I'd be happy to look into this but most of the stuff I've looked at RE: annotations have still required a namespace.
Also, if you can share your specific use case that would be helpful.
I apologize for the delay on this.
First example in ORM doctrine doc:
// src/Product.php
/**
* @Entity @Table(name="products")
**/
class Product
{
/** @Id @Column(type="integer") @GeneratedValue **/
protected $id;
/** @Column(type="string") **/
protected $name;
// .. (other code)
}
There is no namespace.
I tried something like that to learn:
"mappings" => array(
// Using actual filesystem paths
array(
"type" => "annotation",
"namespace" => "",
"path" => __DIR__."/src",
),
....
But i got an error.
This is not very important in real case ;p
OK. :) Mind if I close this issue then?
man it's your code ;p do as you pleaz ;p
Who doesn't use namespaces? :P
try "namespace" => "\"
@marcojanssen +1
I believe the feedback I got from one of the Doctrine team people (can't remember who answered me anymore) was that it had to do with the chain driver requiring a namespace.
@dominikzogg Have you tested it with "namespace" => "\\"
? If that actually works that can be the official suggestion and we can close this.
@simensen nah, it was only a suggestion
In the ORM doc : http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/tutorials/getting-started.html You can have entity class without namespace.
but an error occurs if you let namespace option empty for annotations mapping.