doctrine

Confused between Language & Culture! :(

I'm repeatedly getting confused between Language & Culture in Symfony. - I'm setting culture as (en_US) which I guess is correct - but translation files are created for a language (en) - also, when using translation in the database, the lang=en I have a model whose definition is as follows: Option: package: Options tableName: Com_O...

Need help setting up Doctrine 2

i setup Doctrine 1 b4 but it seems like now when i try Doctrine 2 it fails i have Doctrine installed at D:\ResourceLibrary\Frameworks\Doctrine D:\ResourceLibrary\Frameworks\Doctrine\bin D:\ResourceLibrary\Frameworks\Doctrine\Doctrine D:\ResourceLibrary\Frameworks\Doctrine\Doctrine\Common D:\ResourceLibrary\Frameworks\Doctrine\Doctrine...

Doctrine Column not found: 1054 Unknown column 's.features' in 'field list''

I added a new column "features" to the site table and regenerated the models using Doctrine This code is causing an error $siteTable = Doctrine_Core::getTable("Site"); $site = $siteTable->findOneByName("site"); // this line is throwing an exception Exception : Unknown column "s.features" in field list..... I checked the database ...

using doctrine 2 with SQL Server

I need to migrate an existing project, built on the current beta of doctrine 2, from mysql to SQL Server. I have complete control of the SQL Server. In the DBAL Folder of Doctrine there already is a PDOMsSql driver, but I can't figure out, how to use it. (there is still no documentation) Doctrine also offers two other ways, I could ma...

Relations with multiple keys in Doctrine 1.2

I have two tables, which can be thought of one being a list of parts in a product, and another being the internationalisation table for the full name of those parts. I'm trying to specify a relationship in either Doctrine class code or YAML, but I can't see how to do so on more than one key. For example, from Product to Part is easy, as...

Doctrine schema - avoid sql generation for specific table

Hello everyone, i'm kinda new to Doctrine, been using Porpel before.. I'd like to generate model classes from my schema, but the objects will be stored in a mongoDB - thus i don't need/want Doctrine to generate and insert the SQL for those tables. In Propel there was a handy attribute (skipSql: true) which worked like a charm for ...

Retrieve related objects with Doctrine and Symfony

I searched for a long time, but I don't manage to retrieve two related object in one query. I am using Doctrine and Symfony (uses Doctrine by default). Here is a part of my schema.yml: Member: columns: ...some fields... Report: columns: member: { type: integer, notnull: true } ...some fields... relations: M...

Using PHP doctrine CLI easily in windows

in windows, to use doctrine CLI from any directory i need to use something like php D:\full\path\to\doctrine\bin\doctrine.php --variables here is there anyway i can shorten this so that it becomes something like php doctrine.php --variables here or even doctrine --variables here ...

Error in Doctrine 2 sandbox

i am trying to get started with Doctrine 2. and i am reading their intro. i am stuck trying to run D:\Projects\Websites\php\Doctrine\sandbox>doskey doctrine=php d:\resourcelibrary\frameworks\doctrine\bin\doctrine.php $* D:\Projects\Websites\php\Doctrine\sandbox>doctrine --version Doctrine Command Line Interface version 2.0-DEV // fro...

Doctrine 2 orm:schema-tool:create giving Runtime Exception: Too many arguments

i am trying out the Doctrine 2 sandbox. downloaded the main Doctrine 2 ORM from http://github.com/doctrine/doctrine2 the dbal from http://github.com/doctrine/dbal and common from http://github.com/doctrine/common. placed the packages in approparate folders ... D:\ResourceLibrary\Frameworks\Doctrine\lib\Doctrine\ORM D:\ResourceLibrary\F...

ORM Framework to learn in Preparation for Doctrine 2

i am currently learning Zend Framework 1.10 and intend to use Doctrine 2. however i see to encounter many problems/errors when trying to use the doctrine 2 sandbox. Runtime Exception: Too many arguments Error in Doctrine 2 Sandbox i am wondering if doctrine 2 is not ready, what shld i learn that will be beneficial in preparing me f...

Count number of queries performed by Doctrine

Hi folk! I am using Doctrine and sometimes I've the feeling that it is doing much more things than what I am expecting, so I would like to have more information (and therefore more control) about what Doctrine is doing. So, how I could count the total number of queries that Doctrine is doing?. It would be nice if I could also find the ...

Symfony and Doctrine: sluggable behaviour: field called "slug" is not created

I have this model: Usuario: actAs: Sluggable: unique: true fields: [nombre_apellidos] canUpdate: true inheritance: extends: sfGuardUser type: simple columns: username: type: string(128) notnull: false unique: true nombre_apellidos: string(60) sexo: boolean...

Need help understanding Owning & Inverse side in Doctrine

how can i using common sense, or that objects model the real world understand how doctrine determines which side is owning or inverse and how relationships are uni/bi-directional? say from the doctrine sandbox. 1 user has 1 address. i guess since user owns the house/address, user is the owning side? The owning side of a relationship...

Need help understanding Doctrine one to many

Referencing doctrine reference - one to many unidirectional class User { // ... /** * @ManyToMany(targetEntity="Phonenumber") * @JoinTable(name="users_phonenumbers", * joinColumns={@JoinColumn(name="user_id", referencedColumnName="id")}, * inverseJoinColumns={@JoinColumn(name="phonenumber_id", referencedColumn...

Making sense out of many to many relationships in Doctrine

referencing doctrine reference - association mapping - many to many bidirectional /** @Entity */ class User { // ... /** * @ManyToMany(targetEntity="Group", inversedBy="users") * @JoinTable(name="users_groups", * joinColumns={@JoinColumn(name="user_id", referencedColumnName="id")}, * inverseJoinColumns={@JoinC...

Symfony doctrine data-load segmentation fault

Hi guys, I'm working through the Symfony Jobeet tutorial and am getting a segmentation fault when trying to load data from my fixtures files. PHP 5.2.6-1+lenny8 with Suhosin-Patch 0.9.6.2 (cli), S symfony version 1.4.5 I'm using the Doctrine plugin. My fixtures below: /data/fixtures/categories.yml JobeetCategory: design: name:...

Building a generic OO ACL using Doctrine...

I'm looking to design a doctrine-backed ACL system for my own use, although I'm struggling with some of the initial design considerations. Right now I'm looking at making it based on classes and unique identifiers, storing them in a table as such: Table: ACL ResourceClass ResourceKey RoleClass RoleKey Permission O...

Doctrine relation lost on record update

I'm using Symfony and Doctrine, and have several many-to-many relations that work fine. But there is a table called "document" that holds documents that can relate to several kind of contents, and has an admin section of it's own. Whenever I update a Document, every relation it had to the rest of the tables is lost. I Googled it for a...

Need help understanding this SQL (generated by doctrine)

i am actually reading Doctrine Reference: One to Many, Unidirectional with Join table. but this will probably be more of a SQL quesiton. basically, this is supposed to model a one to many, unidirectional relationship. i guess from the PHP code (in that link), its such that 1 user have many phonenumbers. the question is from the SQL, it ...