Re: [doctrine-user] sqlite & FK checks when deleting an entity

2013-12-17 Thread Marco Pivetta
Do you have an integration test to back this? I think FKs in SQLite were enabled in 2.3.x Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 9 December 2013 21:00, Shadowalker wrote: > Hi, > > I'm trying to run some tests which involve deleting a user l

Re: [doctrine-user] MANY-TO-MANY with extra FIELD

2013-12-18 Thread Marco Pivetta
trine-2-and-many-to-many-link-table-with-an-extra-fieldfor additional details Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 18 December 2013 16:10, Diego Perlman wrote: > I have a MANY-TO-MANY relationship. > > It works fine, but now I have to include a FIEL

Re: [doctrine-user] With join tables with extra columns used yaml for creation annotations class used console CLI

2013-12-22 Thread Marco Pivetta
Hey there, What have you tried so far? You should provide more info on what you had as a failure :) Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 20 December 2013 14:13, Sandro Cândido wrote: > Hi all > > Based in article: > http://future500.nl/doctr

Re: [doctrine-user] DQL select with join returns only one record

2013-12-26 Thread Marco Pivetta
per identifier will appear in your resultset Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 26 December 2013 23:52, wrote: > Hi, > > I have DQL query: > > $query = $qb->select('ta', 'at') >->from('EveSta

Re: [doctrine-user] Doctrine ACL'able relationships.

2014-01-08 Thread Marco Pivetta
I'd keep this in a custom repository (not a doctrine repository): $mySpecialRepo->gimme('obj1_id'); // considers ACL and returns or throws depending on case I wouldn't try to mix the ACL problem with the persistence problem. I tried that in the past and it had horrib

Re: [doctrine-user] Doctrine ACL'able relationships.

2014-01-08 Thread Marco Pivetta
You'd basically avoid hopping through the graph directly, and would go through associations manually through repositories. Another way is via wrappers - the repository returns a wrapped Obj1, Obj2, etc. Each wrapper has logic to filter any association traversal operations. Marco Pivetta

Re: [doctrine-user] Doctrine ACL'able relationships.

2014-01-08 Thread Marco Pivetta
nything at all except for your service endpoints Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 8 January 2014 14:33, Syao Work wrote: > So Doctrine mappings will be used only for association type and identity? > Then knowing that and using respository I sele

Re: [doctrine-user] Doctrine ACL'able relationships.

2014-01-08 Thread Marco Pivetta
How to wrap objects is really up to you - doctrine doesn't support that out of the box. You will likely need to handle that in your service layer and in your entities manually. As for the ACL not being in memory - yes, you will have quite a performance drop there. Marco Pivetta

Re: [doctrine-user] How to import data into an associated schema without duplicating data for a Many to One relationship, and use the existing primary key since the data already exists?

2014-01-09 Thread Marco Pivetta
ype->findOneBy(array('device_type_name' => $info[3]))) { >$device_type = $record; > } > > This only works after all device types have been flushed first. See the approach I've described above Marco Pivetta http://twitter.com/Ocramius http://ocramiu

Re: [doctrine-user] Are CachedReader and MetadataCache redundant?

2014-01-09 Thread Marco Pivetta
Yes, you don't need the annotation cache if you are already caching mappings, since you won't hit the annotation driver again. The cached reader is mostly useful for when you don't use annotations for mappings. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/

Re: [doctrine-user] Why does referencedColumnName have to point to the primary key?

2014-01-09 Thread Marco Pivetta
The primary key is the only way to actually reference an entity: an entity's identifier is actually what distinguishes every entity's instance. Other fields may happen to be unique, but don't have the same meaning of the identifier. Marco Pivetta http://twitter.com

Re: [doctrine-user] SuperClass & Polymorphism

2014-01-10 Thread Marco Pivetta
he "Person" instance differently depending on context. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 10 January 2014 13:18, David R wrote: > Hello, > > I have a trouble about model design with doctrine ORM. > > A product object have many own

Re: [doctrine-user] Re: Doctrine Proxy-Generating Error (Infinite Loop)

2014-01-12 Thread Marco Pivetta
Any news on this? Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 10 January 2014 23:03, Dennis Fedco wrote: > I am currently trying to resolve Doctrine mapping issues, which could be > the cause of this error. I'll report back if unsolved. > >

Re: [doctrine-user] Mapping Fail when implementing ManyToMany relationship

2014-01-12 Thread Marco Pivetta
You would probably need to use `@JoinColumns()` (notice the "s" at the end) to fix that. I think that's quite complex though - why not just use an unique index on those 3 columns and then have a simple sequential identifier? Marco Pivetta http://twitter.com/Ocramius http://ocra

Re: [doctrine-user] Mapping Fail when implementing ManyToMany relationship

2014-01-13 Thread Marco Pivetta
at isn't recognizable simply because the ORM itself can't recognize it in a meaningful way :) Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ -- You received this message because you are subscribed to the Google Groups "doctrine-user" gro

Re: [doctrine-user] Doctrine 2 inheritance : Child could be multiple types

2014-01-13 Thread Marco Pivetta
Seems pretty much a duplicate of the discussion we had the other day on this mailing list: https://groups.google.com/d/msg/doctrine-user/GniwsCJhAIg/CD_yYQUPKNMJ Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 13 January 2014 17:05, geoffroy cochard wrote: >

Re: [doctrine-user] Doctrine2 : multiple ManyToMany on same object

2014-01-23 Thread Marco Pivetta
What about having something like following? EntityA <1:n> EntityATemperatures Temperature Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 23 January 2014 11:18, ibasaw wrote: > <https://lh3.googleusercontent.com/-w2upAw8Slb4/UuDsFLZy2qI/BEg

Re: [doctrine-user] Re: Doctrine2 : multiple ManyToMany on same object

2014-01-23 Thread Marco Pivetta
1:n is OneToMany m:n is ManyToMany Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 23 January 2014 11:31, ibasaw wrote: > thank you for your answer, but what does tha tmean <1:n> and ? > > -- > You received this message because you are subscr

Re: [doctrine-user] PDO Driver not found

2014-01-24 Thread Marco Pivetta
@Olajde PHP-CLI and PHP-Apache2 (or CGI) have different `.ini` configs. Maybe the CLI one is not loading the PDO extension for your particular DB type? Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 24 January 2014 12:39, Jasper N. Brouwer wrote: > Yes, rea

Re: [doctrine-user] Joins between entities without associations

2014-01-26 Thread Marco Pivetta
Could you try this with current DBAL and ORM master? There has been some work around this as far as I know... Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 26 January 2014 20:49, Giuseppe Attardi wrote: > I am using a query like this one: > > >

Re: [doctrine-user] Cross database relationships

2014-01-26 Thread Marco Pivetta
Doctrine ORM supports cross-database relationships on engines that support accessing multiple databases from the same connection. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 27 January 2014 02:56, Alberto Viana wrote: > Hi, > > In my project I have 3

Re: [doctrine-user] Doctine 1.2.5

2014-01-30 Thread Marco Pivetta
1.2.5 would be master (unstable). Doctrine1 is not maintained anymore On 30 Jan 2014 18:59, wrote: > Hi, > > For some reasons I cannot migrate to Doctrine 2. I was using Doctine > 1.2.4. and I noticed the lates one is 1.2.5 but not available for download. > Is there anyway to get Doctrine 1.2.5 p

Re: [doctrine-user] automatic model creator

2014-01-31 Thread Marco Pivetta
Doctrine 2 Includes commands to "convert-mapping" and "generate-entities". You are supposed to use those only while importing your schema for the first time, though. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 31 January 2014 18:15, wrote:

Re: [doctrine-user] Re: migration advantages

2014-01-31 Thread Marco Pivetta
be released as PEAR packages because of the increase of dependencies caused by the split-up of Doctrine\Common into different packages. Switch to composer ASAP, or you'll be likely building something that is deprecated from the beginning. Marco Pivetta http://twitter.com/Ocramius http://ocr

Re: [doctrine-user] encoding v2 with iocube and obfuscate functions

2014-01-31 Thread Marco Pivetta
Code obfuscation should work fine as long as you use the XML or YAML metadata drivers. Annotations are likely not going to work. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 31 January 2014 18:10, wrote: > > I use ionCube with function obfuscation opt

Re: [doctrine-user] Re: downloading latest stable version

2014-01-31 Thread Marco Pivetta
u may verify what versions of doctrine/orm are available via composer from https://packagist.org/packages/doctrine/orm as well. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 31 January 2014 16:58, Alexandru Pătrănescu wrote: > Nowadays libraries are not "do

Re: [doctrine-user] Re: migration advantages

2014-01-31 Thread Marco Pivetta
all failed > Doctrine >= 2.4.0 is not available through PEAR, but through composer Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ -- You received this message because you are subscribed to the Google Groups "doctrine-user" group. To unsu

Re: [doctrine-user] Re: migration advantages

2014-01-31 Thread Marco Pivetta
y EVERYONE uses it). The simple way to install composer (and to verify if your system supports it) is running: `curl -s https://getcomposer.org/installer | php` You can read how composer works at http://getcomposer.org/ - be sure to read the documentation, since it's a must for using any of t

Re: [doctrine-user] Re: migration advantages

2014-01-31 Thread Marco Pivetta
ctrine folder located?) > Why do you keep trying with PEAR when I just told you that PEAR is di-i-e-a-d (DEAD)? What's the issue with installing composer? It doesn't require any particular rights. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ -- You re

Re: [doctrine-user] Re: migration advantages

2014-01-31 Thread Marco Pivetta
> then under the same composer folder run this shell command: > $ php composer.phar install > is it correct? if yes, when where /doctrine/ will be located? > Correct. Once you ran `composer install`, your doctrine executable will be at `./vendor/bin/doctrine` Marco Pivetta http://twit

Re: [doctrine-user] Re: migration advantages

2014-01-31 Thread Marco Pivetta
What is the output of `php composer.phar install`? Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 31 January 2014 20:46, wrote: > > I get this please advice > > root [/root]# pwd > /root > root [/root]# ls -al composer.* > -rw-r--r--. 1 root

Re: [doctrine-user] Re: migration advantages

2014-01-31 Thread Marco Pivetta
You can run composer on any machine having PHP installed Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 31 January 2014 20:57, wrote: > > If you were able this all, could you just .zip the /vendor/ folder and > upload somewhere that I can download? I appr

Re: [doctrine-user] Re: migration advantages

2014-01-31 Thread Marco Pivetta
in your development workflow. Additionally, I don't provide "private support" without invoicing, but that's me ;-) Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ -- You received this message because you are subscribed to the Google Groups "doc

Re: [doctrine-user] Re: migration advantages

2014-01-31 Thread Marco Pivetta
It just needs to be valid json. You can run a `php composer.phar validate` to verify if things are correct. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 31 January 2014 21:14, wrote: > > let's check once again: > first chmod composer.phar as execut

Re: [doctrine-user] symfony/event-dispatcher and symfony/yaml

2014-01-31 Thread Marco Pivetta
tures of the libraries. You don't need to install suggested packages Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ -- You received this message because you are subscribed to the Google Groups "doctrine-user" group. To unsubscribe from this group and st

Re: [doctrine-user] Re: migration advantages

2014-01-31 Thread Marco Pivetta
Please, don't start new threads _AND_ ask the same question on the old ones :-) Also: read the docs - suggested packages are just suggested Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 31 January 2014 22:08, wrote: > Mua, finally success but I

Re: [doctrine-user] Re: symfony/event-dispatcher and symfony/yaml

2014-01-31 Thread Marco Pivetta
You should never ever edit any file from libraries that you import. That applies also to deleting files. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 31 January 2014 22:44, wrote: > > after developping my product, may be there are lots of files in /do

Re: [doctrine-user] Re: symfony/event-dispatcher and symfony/yaml

2014-01-31 Thread Marco Pivetta
Distributing just your source files and the `composer.json` and `composer.lock` files with them should be sufficient. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 31 January 2014 22:51, wrote: > > Let's check if I am correct: I must re-distribute

Re: [doctrine-user] Re: symfony/event-dispatcher and symfony/yaml

2014-01-31 Thread Marco Pivetta
Do you really need to obfuscate also imported OSS libraries? That sounds quite pointless to me. `composer.json` and `composer.lock` are the minimum requirements that are needed in order to have a complete installation of a project. Marco Pivetta http://twitter.com/Ocramius http

Re: [doctrine-user] Re: symfony/event-dispatcher and symfony/yaml

2014-01-31 Thread Marco Pivetta
with ionCube and do > you know how it works? > Used it once: never again, thx :P > How composer.json and composer.lock work? do they call doctrine files > remotely from repository server? please clarify. > Please read the manual of composer at http://getcomposer.org/ Marco Pivet

Re: [doctrine-user] auto-generating models

2014-02-01 Thread Marco Pivetta
You can take that exact error message, paste it into google search and you'll find this: http://wildlyinaccurate.com/doctrine-2-resolving-unknown-database-type-enum-requested Yes, Doctrine2 does not support ENUMs, given that they are not consistently working cross-platform :-) Marco Pi

Re: [doctrine-user] Re: auto-generating models

2014-02-01 Thread Marco Pivetta
You should really use one of YAML, XML or Annotation drivers - the PHP driver is supposed to be used by very experienced users with very custom use cases Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 1 February 2014 21:26, Parsifal wrote: > > Thanks a lot,

Re: [doctrine-user] Re: auto-generating models

2014-02-01 Thread Marco Pivetta
; Need the exception message to find out what the exception is about... Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ -- You received this message because you are subscribed to the Google Groups "doctrine-user" group. To unsubscribe from this group a

Re: [doctrine-user] metadata file

2014-02-01 Thread Marco Pivetta
en it in action, but I'm pretty sure that it will explode as well. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 1 February 2014 22:55, Parsifal wrote: > > First of all I must say due to ioncube I can only use PHP driver and NOT > XML/YML/Annotaion &

Re: [doctrine-user] Re: auto-generating models

2014-02-01 Thread Marco Pivetta
b) the exception message c) the exception stack trace 2- please don't spawn a new thread for each question you have if it's pertinent to current discussions going on Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ -- You received this message because you

Re: [doctrine-user] Doctrine one to one relation does not work as expected

2014-02-01 Thread Marco Pivetta
Could you expand the example to include how your example to explain how you are constructing your objects and what expectation is failing? Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 1 February 2014 22:32, korso3 wrote: > Hi, > > I have two problems wi

Re: [doctrine-user] Re: metadata file

2014-02-01 Thread Marco Pivetta
w better and think that your question is simple, then why are you asking it on the mailing list? :-) Or why not simply fix your project first, and fix it for the broken "ionCube" (wrong technology applied to the wrong task, IMO) once you've learned how to work smoothly with the ORM?

Re: [doctrine-user] Re: metadata file

2014-02-02 Thread Marco Pivetta
I am not denying anything. The config is correct, but the ORM can't work without finding the class "Clients", which must be defined. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 2 February 2014 19:52, Parsifal wrote: > > I don't under

Re: [doctrine-user] Re: metadata file

2014-02-03 Thread Marco Pivetta
Hey Parsifal, Proxies are always required when working with the ORM - they are auto-generated code that is usually dumped into some kind of temporary directory. You may want to disable auto-generation and dump them manually though, since you use ionCube. Marco Pivetta http://twitter.com

Re: [doctrine-user] fieldName property

2014-02-03 Thread Marco Pivetta
Fields and columns are glued together by mappings - they don't need to correspond. You just need to ensure that the property "clientId" exists on the class, and the column "client_id" exists on the table. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.

Re: [doctrine-user] ObjectManager from repository

2014-02-03 Thread Marco Pivetta
class needs to use the manager, inject it as a dependency instead of using >> the repository as a service locator for the manager >> > > Thats what I'm doing right now, but it sometimes feel slightly cumbersome > to always inject both. > It's actually quite o

Re: [doctrine-user] fieldName property

2014-02-03 Thread Marco Pivetta
Uhhh... Why are you jumping forward to NativeSQL already? That kinda defeats the advantage of using the ORM almost completely, at least for those simple queries. Did you validate your mappings first? Are they in sync with your DB? Marco Pivetta http://twitter.com/Ocramius http

Re: [doctrine-user] Re: metadata file

2014-02-03 Thread Marco Pivetta
Honestly, I'm not sure - never happened to me to have a use case for manual mapping, so it is really hard to know what is going on there. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 3 February 2014 15:01, Nima Sadjadi wrote: > Thanks a lot for advice. H

Re: [doctrine-user] help configuring 'doctrine2 console command' to work with zend 2, doctrine 2 on wampserver

2014-02-03 Thread Marco Pivetta
Hey there, Are you running this via CMD or git bash? You can eventually try running `php vendor/bin/doctrine-module` - that should do as well. GIT bash works just with `./vendor/bin/doctrine-module` Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 2 February 2014 23

Re: [doctrine-user] fieldName property

2014-02-03 Thread Marco Pivetta
Many things can go wrong there because of the exhotic setup. I'd suggest working with mappings with XML/YML first and then converting them to pure PHP once you are sure about what you are doing and what they should look like. Also, try different hydration modes when querying. Marco Pivetta

Re: [doctrine-user] Re: metadata file

2014-02-03 Thread Marco Pivetta
ing back to XML/YAML mappings and _then_ (after everything works) trying to compatibilize with this ionCube nightmare :-) Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 3 February 2014 15:11, Nima Sadjadi wrote: > Herman Peeren or a staff developper can help for t

Re: [doctrine-user] Re: metadata file

2014-02-03 Thread Marco Pivetta
t thing to do when analyzing a bug or unexpected condition is to reduce the scope of the analysis: by introducing so many custom factors, you are just overcomplicating the problem from the beginning. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ -- You received this mess

Re: [doctrine-user] Re: metadata file

2014-02-03 Thread Marco Pivetta
On 3 February 2014 15:26, Nima Sadjadi wrote: > One more question please: > I did setup table prefix setup as in manual and it seems to work fine but > as the prefix is hard-coded in auto-generated entity files, I should just > remove the prefix from entity files? Or what > Can you elaborate a b

Re: [doctrine-user] ObjectManager from repository

2014-02-03 Thread Marco Pivetta
a hard time in requesting a repo by interface name. > > About "the repository is about querying": I agree here in the following > sense: I use Repositories mainly for read queries, and perform persists and > flushed outside of Repositories. But when I'm in need of ins

Re: [doctrine-user] Finally success but

2014-02-03 Thread Marco Pivetta
On 3 Feb 2014 19:44, "Parsifal" wrote: > > HI, > > I used: > > $query = $em->createQuery('SELECT u.username FROM Entities\clients u'); > $users = $query->getResult(); > print_r($users); > > Then: > .. > [1] => Array > ( > [username] => ksazkhdca > ) > > Wow! finall

Re: [doctrine-user] Finally success but

2014-02-03 Thread Marco Pivetta
gt;addEntityResult('PrefixClients', 'u'); > $rsm->addFieldResult('u', 'client_id', 'clientId'); > $rsm->addFieldResult('u', 'first_name', 'firstName'); > $query = $em->createNativeQuery('SELECT client

Re: [doctrine-user] Finally success but

2014-02-04 Thread Marco Pivetta
m you until I'm sure that you have tried everything possible and familiarized with the library itself - given the time elapsed between your questions, I'm pretty much sure that you didn't do any of that. Cheers, Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.

Re: [doctrine-user] ObjectManager from repository

2014-02-04 Thread Marco Pivetta
On 3 February 2014 16:30, Jasper N. Brouwer wrote > PS: I do try to keep an eye out for over-enginering. Most project I work > on don't really need perfect abstraction ;) > Yes, that indeed makes sense: I also do this only on OSS or reusable projects. Marco Pivetta http

Re: [doctrine-user] Stupid query or a bug?

2014-02-05 Thread Marco Pivetta
Hi Thomas, I don't see any obvious mistakes in your query - did you validate your mappings first? What is the exact version of doctrine/orm in your `composer.lock`? Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 5 February 2014 11:05, Thomas Lundquist

Re: [doctrine-user] Stupid query or a bug?

2014-02-05 Thread Marco Pivetta
ly spin up XDebug and see parameters/stack traces for that exception? If that doesn't help, then I suggest writing a test case like the ones in https://github.com/doctrine/doctrine2/tree/v2.4.1/tests/Doctrine/Tests/ORM/Functional/Ticket, which would allow us to debug it in more detail. Marc

Re: [doctrine-user] error in my code when i followed the doctrine 2 tutorial at 9.1. Association Example Entities

2014-02-06 Thread Marco Pivetta
Hi Andreea, Could you maybe create a gist (http://gist.github.com/) with the entities being involved? Did you create the entities or the tables? Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 6 February 2014 11:38, paul kendal wrote: > Hello everyone. >

Re: [doctrine-user] Stupid query or a bug?

2014-02-06 Thread Marco Pivetta
Hi Thomas, As I've suggested on IRC (you probably didn't read my ping), consider tracing also parameters (xdebug.collect_params), which makes this easier to analyze. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 6 February 2014 10:37, Thomas Lundq

Re: [doctrine-user] error in my code when i followed the doctrine 2 tutorial at 9.1. Association Example Entities

2014-02-06 Thread Marco Pivetta
Hi Paul, Can you try an `orm:schema-tool:update --dump-sql`? You likely already have a table called `user_comment` somewhere, and doctrine wants to pick that name for a many-to-many association here... Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 6 February 2014

Re: [doctrine-user] error in my code when i followed the doctrine 2 tutorial at 9.1. Association Example Entities

2014-02-06 Thread Marco Pivetta
in\doctrine-module orm:validate-schema* it reverted back to the > same problem. > > any idea of what to do ? > Are these two the only entities in your schema? Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ -- You received this message because you are subscribed t

Re: [doctrine-user] manytomany query

2014-02-06 Thread Marco Pivetta
Hi Zarloc, The first query will always produce no results: "SELECT p FROM Module\Entity\Product p JOIN p.subcategories s WHERE s.id =1 AND s.id = 3" This is looking for a subcategory that has both ID 1 and 3 - that is obviously not possible. Cheers, Marco Pivetta http://twitter.co

Re: [doctrine-user] about Proxy

2014-02-09 Thread Marco Pivetta
Yes, if auto-generation is turned off, then you need to re-distribute the generated proxies with your product. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 9 February 2014 20:57, Parsifal wrote: > > Hi, > Sorry, I am a bit confused about Proxy. As state

Re: [doctrine-user] WITH ROLLUP

2014-02-09 Thread Marco Pivetta
"WITH ROLLUP" is platform-specific, and DQL doesn't support it Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 9 February 2014 14:01, Parsifal wrote: > > Here > > http://docs.doctrine-project.org/en/latest/reference/dql-doctrine-query-lan

Re: [doctrine-user] WITH ROLLUP

2014-02-09 Thread Marco Pivetta
In order to use database-specific feature, you have to use native SQL: http://docs.doctrine-project.org/en/latest/reference/native-sql.html Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 9 February 2014 23:50, Nima Sadjadi wrote: > So how to use it with doctr

Re: [doctrine-user] Is it possible to have Symfony and/or Doctrine hydrate associated objects managed by different entity mangers?

2014-02-10 Thread Marco Pivetta
Hi Stephen, If you have to work with different servers when working with Doctrine ORM (and especially different DB types), I am afraid that you will have to keep the entities completely separate and solely linked by identifier references (no direct mapping). Cheers, Marco Pivetta http

Re: [doctrine-user] Odd Doctrine 2.4 DQL parsing problem with JOINs

2014-02-13 Thread Marco Pivetta
anymore: it was an old bug, fixed in 2.4. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ -- You received this message because you are subscribed to the Google Groups "doctrine-user" group. To unsubscribe from this group and stop receiving emails fr

Re: [doctrine-user] schema-tool:update

2014-02-14 Thread Marco Pivetta
This is in the getting started documentation... Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 15 February 2014 00:45, Parsifal wrote: > Just wanted to make sure, if I understand correctly, if eventually I > forgot to set the appropriate fields as index or f

Re: [doctrine-user] schema-tool:update

2014-02-14 Thread Marco Pivetta
Yes, the schema can come from the entities directly (that's actually how you are supposed to use doctrine 2 ORM). You can just create a small "install" script that generates the database through the schema tool. Marco Pivetta http://twitter.com/Ocramius http://ocramius.gith

Re: [doctrine-user] Fetch object or fetch into in doctrine dbal for non-pdo drivers

2014-02-15 Thread Marco Pivetta
The question was deleted - can you provide the full example of what you need? Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 15 February 2014 15:55, egi gundari wrote: > Need help. I need to do "fetch object" or "fetch into" but use other &

Re: [doctrine-user] Cache with memory_limit

2014-02-15 Thread Marco Pivetta
What is "memory_limit"? Doctrine\Common\Cache is just a series of adapters that write/read single keys from different backends. How these backends are configured is not up to doctrine. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 14 February 2014 1

Re: [doctrine-user] schema-tool:update

2014-02-15 Thread Marco Pivetta
The ORM takes care of index/FK DDL execution when running schema updates. Indexes and FKs are part of the mappings Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 15 February 2014 23:44, Nima Sadjadi wrote: > > I did use: orm:schema-tool:update --dump-sq

Re: [doctrine-user] Cache with memory_limit

2014-02-15 Thread Marco Pivetta
cross requests, therefore being relatively useless for most use cases. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ -- You received this message because you are subscribed to the Google Groups "doctrine-user" group. To unsubscribe from this group and stop recei

Re: [doctrine-user] schema-tool:update

2014-02-16 Thread Marco Pivetta
Can you please try it out? You can see the API for defining indexes in mappings at http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/php-mapping.html- the schema tool will add those indexes when generating or updating the db. Marco Pivetta http://twitter.com/Ocramius

Re: [doctrine-user] Re: difficulty in translating from sql to dql

2014-02-17 Thread Marco Pivetta
Why did you move DoctrineExtensions under the "Doctrine\ORM" namespace? It's a separate library... Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 18 February 2014 00:59, Nima Sadjadi wrote: > > Do these extensions work for anyone? I could not

Re: [doctrine-user] Doctrine ORM and PHP namespace project separation

2014-02-17 Thread Marco Pivetta
connection in your own CLI tools built around the schema tools. Cheers, Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 18 February 2014 07:50, Roy Epperson wrote: > I just starting to investigate how to separate PHP classes into namespaces > with their own Do

Re: [doctrine-user] Doctrine ORM and PHP namespace project separation

2014-02-17 Thread Marco Pivetta
On 18 February 2014 08:31, Roy Epperson wrote: > Hi Marco, > > Embedded questions > > On Feb 17, 2014 11:13 PM, "Marco Pivetta" wrote: > > > > Hi Roy, > > > > All operations for generating mappings or generating schema from > entities+mapping

Re: [doctrine-user] Deletion

2014-02-18 Thread Marco Pivetta
Hi Leandro, I am not sure if I understand your problem, but I guess that you need to look into database cascade operations (and the cascade docs on the ORM documentation). Could you paste a snipped of pseudo-code and show what you are doing and what you'd expect (and is not happening)?

Re: [doctrine-user] Multi-database user defined function call scenario

2014-02-20 Thread Marco Pivetta
x27;getSql' method Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 20 February 2014 13:12, George DRAGU wrote: > Hello, > > We have an application with 2 backend databases (up until now) MS SQL and > Oracle. > All the objects in the database share

Re: [doctrine-user] @MappedSuperclass vs plain abstract class

2014-02-21 Thread Marco Pivetta
This is really just a lucky case based on how the annotation driver works - agreed, it is confusing. It works because your properties are "protected" I suggest you to try the same with XML or YAML mappings - you will see how it crashes badly. Marco Pivetta http://twitter.com/Ocra

Re: [doctrine-user] @MappedSuperclass vs plain abstract class

2014-02-21 Thread Marco Pivetta
Yep, you should still define that as a mapped superclass Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 21 February 2014 12:10, Benjamin Morel wrote: > Thank you Marco, so @MappedSuperclass is the way to go then? > > > > *From:* doctrine-user@g

Re: [doctrine-user] merge entity without fetch from database?

2014-02-21 Thread Marco Pivetta
Hi Hoessi, Did you consider using the second level cache for this? It's still available only in master, but you should check it out: http://docs.doctrine-project.org/en/latest/reference/second-level-cache.html Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/

Re: [doctrine-user] contribute from_unixtime extension

2014-02-23 Thread Marco Pivetta
Heya, To get it into DoctrineExtensions, you should open a pull request against https://github.com/beberlei/DoctrineExtensions Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 23 February 2014 12:24, Nima Sadjadi wrote: > Attached here I contributemy from_unixt

Re: [doctrine-user] EXTRA-LAZY as default

2014-02-25 Thread Marco Pivetta
I personally wouldn't like having collections handled extra-lazy by default, for example (personal requirements) There's a nice little "story" about that at http://thecodelesscode.com/case/72 Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 25

Re: [doctrine-user] Doctrine ORM and PHP namespace project separation

2014-02-25 Thread Marco Pivetta
As long as the FQCNs of the entities are unique, you don't have any trouble in putting all proxies in a single location. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 26 February 2014 05:04, Roy Epperson wrote: > Finally got back to working on the Subject

Re: [doctrine-user] Doctrine ORM and PHP namespace project separation

2014-02-25 Thread Marco Pivetta
Fully Qualified Class Name - basically the full class name (short name + namespace) As long as the FQCN is unique among all classes in your projects (you don't have duplicates), then you have no problems in having proxies in a single location Marco Pivetta http://twitter.com/Ocramius

Re: [doctrine-user] Doctrine ORM and PHP namespace project separation

2014-02-25 Thread Marco Pivetta
the ORM when you have an ID reference to an object, but not its data. I wrote extensively about that at http://ocramius.github.io/presentations/proxy-pattern-in-php/#/ if you need to understand what this stuff is about :-) Cheers, Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com

Re: [doctrine-user] Connect symfony2 to sql srv 2000

2014-02-26 Thread Marco Pivetta
What kind of setup do you use for that? And what exceptions are you getting? On 26 Feb 2014 16:48, "Luis Vicente" wrote: > I can't make do a successful conexion between my project symfony 2 and sql > server 2000. I tried with driver php_pdo_sqlsrv_53_ts_vc9.dll but it didnt > work. > Anyone know

Re: [doctrine-user] Connect symfony2 to sql srv 2000

2014-02-26 Thread Marco Pivetta
The exception states your problem loud and clear if you read carefully. You have to use "pdo_sqlsrv", not "mssql" Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 26 February 2014 17:45, Luis Vicente wrote: > > in paremeters.ini I'm

Re: [doctrine-user] Re: INNER JOIN

2014-02-26 Thread Marco Pivetta
d. Did you > maybe forget to add a "use" statement for this annotation? > > You need to prefix the annotation with "ORM\", so it should be "@ORM\OneToOne" Read your exception messages carefully ;-) Marco Pivetta http://twitter.com/Ocramius http://ocr

Re: [doctrine-user] doctrine (DBAL?) uppercases table name "`user`" to "User", then can't find it

2014-02-27 Thread Marco Pivetta
acme.User? Are you sure that annotation mappings are actually being considered here? What does your metadata for the User entity look like? Check it with: $em->getClassMetadata('Acme\Bundle\UserBundle\Entity\User'); Marco Pivetta http://twitter.com/Ocramius http://ocramius.git

Re: [doctrine-user] doctrine (DBAL?) uppercases table name "`user`" to "User", then can't find it

2014-02-27 Thread Marco Pivetta
It is most likely not picking up your annotation mappings as it seems... Try modifying them and you will see the outcomes Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 27 February 2014 19:09, otis wrote: > The class metadata returned by $em->getClassMetadata

  1   2   3   4   5   6   7   >