Doctrine 2 and codeigniter 2, how to use generated code

stackoverflow.com - 2012-06-27 07:24:50 - Similar - Report/Block

Working a few months with CodeIgniter, newbe with Doctrine. I work recently with https://github.com/wildlyinaccurate/Code Igniter-2-with-Doctrine-2 as the base and defining entities from mysql table/columns with generate_classes() function ( application/libraries/Doctrine.php, called once before constructor ends, comment it after entitie...

Doctrine Cli WIndows

stackoverflow.com - 2013-03-26 01:28:42 - Similar - Report/Block

I am having some trouble configuring doctrine orm on windows 8, php 5.4. I have installed Doctrine using Composer. I have followed the docs to the letter but when I run any commands, php vendor/bin/doctrine orm:schema-tool:create for example, my command line just outputs SRC_DIR="`pwd`" cd "`dirname "$0"`" cd "../doctrine/orm/bin" BIN_TAR...

Tappi and Kayani brother

siasat.pk - 2013-05-15 07:31:04 - Similar - Report/Block

It is now openly said that General Kayani brother is business partner of Tappi. Generals in real-estate business—WikiLeaks missing stories released * President Zardari demanded Rs2 billion from real-estate tycoon Malik Riaz.... * Malik made Gen. Kayani’s brother business-partner on Presidential threats... * ISI chief owns many commerci...

Symfony2 & Doctrine2 PDOException without description

stackoverflow.com - 2012-04-13 13:26:02 - Similar - Report/Block

I wanted to use this code, and it break on flush() without any exception message: 1. at PDOStatement ->execute (null) in ../vendor/doctrine-dbal/lib/Doctrine/DBA L/Statement.php at line 131 2. at Statement ->execute () in ../vendor/doctrine/lib/Doctrine/ORM/Pers isters/BasicEntityPersister.php at line 237 3. at BasicEntityPersister...

Zend Framework 2 - How to configure bjyauthorize for Doctrine

stackoverflow.com - 2013-03-13 10:05:02 - Similar - Report/Block

The bjyauthorize doc says that there is a way to configure it for Doctrine. By default, it provides simple setup via config files or by using Zend\Db or Doctrine ORM/ODM (via ZfcUserDoctrineORM). But the module itself doesn't contain any entities and I didn't found how to set it up. Does anybody know a step-by-step tutorial for setting i...

How to configure Doctrine entities to handle compressed blobs in the database?

stackoverflow.com - 2012-03-08 11:54:15 - Similar - Report/Block

I'm using Doctrine 2 as an ORM to the database and i'm having an issue with compressed blobs. I'm storing text in a compressed blob column in the database. How can i specify this in the entity mapping xml config? I'm currently using type="blob" for this column but this isn't returning a string. I could use type="text" but this returns g...

No matching global declaration available for the validation root Symfony

stackoverflow.com - 2013-05-05 06:13:16 - Similar - Report/Block

I am trying to implemment doctrine annotations as XML, but i am getting this error: Element '{http://doctrine-project.org/schemas/or m/doctrine-mapping}doctrine-mapping': No matching global declaration available for the validation root This is my XML: and these are my extensions: $loader = new Loader\XmlFileLoader($container, new FileLocat...

Doctrine 2.2 HYDRATE_OBJECT extremely slow compared to HYDRATE_ARRAY

stackoverflow.com - 2012-06-09 18:54:36 - Similar - Report/Block

I'm struggling with Doctrine 2 performce when using HYDRATE_OBJECT . When I switch from HYDRATE_ARRAY HYDRATE_OBJECT , it takes nearly 10 times longer! I've used doctrine 2 and zend paginator as reference: $query = $em->createQuery($dql) ->setHydrationMode(\Doctrine\ORM\Abst ractQuery::HYDRATE_ARRAY) ->setParameter('x', 1); //...

Doctrine 2 inject data to loaded models

stackoverflow.com - 2012-02-24 21:43:53 - Similar - Report/Block

I have a Doctrine 2 model which has a relation to a file system model (MogileFS) which I've implemented using a model/mapper approach. What I'm trying to accomplish is to lazy load the non-doctrine model from a Doctrine 2 entity, and inject a mapper object into this model while doing so. Example: use Doctrine\ORM\Tools\Pagination\Paginato.. .

how to set date in controller symfony

stackoverflow.com - 2012-05-31 16:59:09 - Similar - Report/Block

i have a field nammed "birthday" in doctrine entity. i wanna create an object to add to database using doctrine. inside the controller : $name = "John Alex"; $birthday = "11-11-90"; $student = new Student(); $student->setName($name); $student->setBirthday(strtotime($birt hday); but when i try to persist i get this error Fatal error:...

Service DependencyInjection in Symfony2

stackoverflow.com - 2012-03-22 14:06:51 - Similar - Report/Block

I need to move my model from controler methods. so I got help to make it as a service. service by itself works but i need to be able to connect to doctrine and kernel from inside of this service. at first I wanted to enable doctrine but went to problems. How can I make this working? I've followed docs and got this code. I have no idea why...

Zend Framework, Doctrine Help needed

stackoverflow.com - 2009-12-10 06:02:59 - Similar - Report/Block

i am following the tutorial from http://www.zendcasts.com/introducing-doc trine-1-2-integration/2009/11/ i have a doctrine.php that "bootstraps?" doctrine ... sry i dont really fully understand the tut yet // Define path to application directory defined('APPLICATION_PATH') || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/..

evolveStar Join

How can I run a doctrine 2 migration commandline without interaction?

stackoverflow.com - 2010-08-10 11:28:25 - Similar - Report/Block

How can I run a doctrine 2 migration command without interaction? Currently I have following command which runs on the setup of my Unit Tests. But It always prompt for a Yes/No user input, even when I use the -no-interaction option. $input = new Symfony\Components\Console\Input\ArrayIn put( array( 'migrations:migrate', '-configuration'...

How to modify the structure of a production database with symfony 1.4

stackoverflow.com - 2012-03-25 00:18:13 - Similar - Report/Block

Problem: I have a symfony project with a database full of production data I want to change its structure (add/drop a table or add/drop/change an existing field) How do I do that without wiping my database ? Because when you change your schema.yml, you need to doctrine build --all if you want your changes to take place in the database, an...

Problem with MATCH AGAINST in Doctrine

stackoverflow.com - 2010-11-21 17:09:26 - Similar - Report/Block

I found that if I use MATCH AGAINST in Doctrine with WHERE syntax does not replace the parameters passed. For example if I run the following code q = Doctrine_Query::create() ->select('*') ->from('TourismUnit tu') ->where('FALSE'); if ($keywords) { $keywords_array = $this->parse_keywords($keywords); for ($i...

Limit recursion of entities in Doctrine ORM

stackoverflow.com - 2013-06-02 12:34:26 - Similar - Report/Block

I am using Symfony's Doctrine 2 ORM with MySQL with mapping like this class A { /** @ManyToOne(targetEntity="B") */ private $b; class B { /** @ManyToOne(targetEntity="C") */ private $c; I want to make a query which returns object of class A and B but without object of C. $query = $entityManager->createQuery(" SELECT a FROM \A a left...

Symfony2 + Doctrine2 + SQL Server - Transaction Support

stackoverflow.com - 2012-05-17 19:44:49 - Similar - Report/Block

I'm developing a private enterprise application in Symfony2 that connects to a SQL Server instance. I've had lots of problems when dealing with SQL Server but so far I've managed it, until now. I'm using FreeTDS + DBLib to connect to the SQL Server instance, and this driver does not support transactions. This leads me to the following pro...

Return selected columns from a query in Doctrine 2/ZF

stackoverflow.com - 2012-03-11 18:23:26 - Similar - Report/Block

I am using Doctrine 2 to manage my entity and Zend_Auth to manage authorisation. I can easily get a full details of a user using $user = $this->em->getRepository('Entities \User')->findOneByUsername($username) ); I successfully authorise, and then want to store the user so that I can access certain details $storage = $auth->getS...

Doctrine DQL: erroneous sql generation (?)

stackoverflow.com - 2012-06-16 21:44:19 - Similar - Report/Block

I'm haveing big troubles while developing a quietly advanced DQL query for a tiny DMS: The schema: DmsObject is a superclass for which two subclasses exist (document and folder) UserRights and GroupRight (which are associative entities in the db, pointing respectively to user and group tables). User and Group represent (obvious) the dms "...

Possible to generate entity class based on YML file?

stackoverflow.com - 2012-04-20 00:14:52 - Similar - Report/Block

I'd like to create an entity class based on meta data stored in a YML file. Is this (easily) possible? I've been digging around the Doctrine library, and found Doctrine\ORM\Tools\EntityGenerator Doctrine\ORM\Mapping\ClassMetadataInfo , but I haven't quite figured out how to properly use them, or even if they're they classes I should be u...

How to select randomly with doctrine

stackoverflow.com - 2012-05-26 01:51:24 - Similar - Report/Block

Hi Here is how I query my database for some words $query = $qb->select('w')->from('DbEntities \Entity\Word', 'w')->where('w.indictionary = 0 AND w.frequency > 3')->orderBy('w.frequency', 'DESC')->getQuery()->setMaxResults (100); I'm using mysql and I'd like to get random rows that match the criteria, I would use order...

doctrine: QueryBuilder vs createQuery?

stackoverflow.com - 2010-04-20 23:07:05 - Similar - Report/Block

in doctrine you can create DQL in 2 ways: QueryBuilder: $query = $em->createQuery('SELECT u FROM MyProject\Model\User u WHERE u.id = ?1'); EntityManager::createQuery $qb->add('select', 'u') ->add('from', 'User u') ->add('where', 'u.id = ?1') ->add('orderBy', 'u.name ASC'); i wonder what the difference is and which you sh...

Hints and tutorial with Symfony2 Doctrine?

stackoverflow.com - 2012-02-20 06:41:19 - Similar - Report/Block

I am practising with symfony2, I have completed the Symblog Tutorial And Now I have stated creating my own small application. I have created a registration form and Login form. Now I have a lot of doubts about the doctrine queries set, I have never used an MVC architecture. How to write these queries and where I need to write them. Do I n...

execute php app/console doctrine:schema:update from controller symfony 2

stackoverflow.com - 2012-03-06 18:27:43 - Similar - Report/Block

I want to execute this command php app/console doctrine:schema:update from the controles without use php function, Any comment will be use full to me. Thanks!!!...

Doctrine 2: How to search for an entity by its association's value?

stackoverflow.com - 2012-03-29 22:55:01 - Similar - Report/Block

Let's say I have an Account entity, and an AccountData entity (which stores some less used properties, like gender, etc). The relationship between Account and AccountData is one-to-one, and the Account "owns" AccountData. I'm trying to figure out, using Doctrine 2 / Symfony 2, how to pull up an Account according to a property in AccountDa...

Unusual 1452 error with Doctrine

stackoverflow.com - 2012-06-18 19:11:06 - Similar - Report/Block

I'm currently breaking my head on a 1452 error (using Symfony2 with doctrine). Here is the case: I have 3 tables, Location, Concert and CD, and as expected a Concert take place at a Location, and a CD is related to a Concert, that's including some foreign keys. Here is the SQL queries generated by doctrine to create the database: CREATE T...

Why is mongoCursor-> key() causing php to crash?

stackoverflow.com - 2012-06-07 01:18:32 - Similar - Report/Block

I'm trying to run the test suite for doctrine\mongo-odm on my local machine. Php crashes with no error messages (when I say crash, I mean crash, the php process terminates) on the is test: Doctrine\ODM\MongoDB\Test\Functional\Fil esTest::testFiles The test has the following content: public function testFiles() $image = new File(); $image...

How to get the greatest of two values in Doctrine?

stackoverflow.com - 2013-02-26 06:48:37 - Similar - Report/Block

How would you do this using Doctrine Query Builder? SELECT p, GREATEST(p.price1, p.price2) AS price This fails: $queryBuilder = $this->repository->createQueryBuilder('p ') ->addSelect('p, GREATEST(p.price1, p.price2) AS price') ("[Syntax Error] line 0, col 10: Error: Expected known function, got 'GREATEST'")...

Event-based extension of query builder in Doctrine repository

stackoverflow.com - 2012-05-22 10:51:07 - Similar - Report/Block

I have a Doctrine entity which is loaded by module . The page is a nested set provided by the Gedmo Doctrine Extension . The module has another model Metadata , 1:1 related to a page. I would like to join the metadata directly when loads the tree. So inside module $em->getRepository('My\Entity\Page')- >getRootNodes(); This loads a...

Doctrine - How to print out the real sql, not just the prepared statment?

stackoverflow.com - 2010-01-19 18:15:34 - Similar - Report/Block

We're using Doctrine, a PHP ORM. I am creating a query like this: $q = Doctrine_Query::create()->select('id' )->from('MyTable'); and then in the function I'm adding in various where clauses and things as appropriate, like this $q->where('normalisedname = ? OR name = ?', array($string, $originalString)); Later on, before execute()...

Doctrine2 migrations inside Symfony2 throw Exception on index creation

stackoverflow.com - 2013-03-20 09:50:49 - Similar - Report/Block

The problem With no previous migration pending I run: app/console doctrine:migration:diff app/console doctrine:migration:migrate I got this error: ALTER TABLE session ADD CONSTRAINT FK_9955C22EA76ED395 FOREIGN KEY (user_id) REFERENCES user(id) Migration 20130320103822 failed during Execution. Error SQLSTATE[HY000]: General error: 1005 Can...

ManyToOne mapping with Doctrine and undefined index warnings

stackoverflow.com - 2012-07-05 16:36:58 - Similar - Report/Block

I'm sure there's a simple solution to this, but I can't fathom what's going on. I have an entity called a Payment and two other entities called Household has many Payment s and and a Household has many Payment s. This is all mapped as unidirectional manyToOne relationships of the Payment using YAML, like this (hopefully this is in lin...

Doctrine MongoDB Referencing and Inheritance

stackoverflow.com - 2013-04-20 19:41:36 - Similar - Report/Block

I am having problems with Doctrine MongoDB ODM. Scenario is very simple (I think). I have set of documents with COLLECTION_PER_CLASS inheritance model (Base, Product, etc). This all works well and I can persist objects as usual. /** * @ODM\Document(collection="content_base") * @ODM\InheritanceType("COLLECTION_PER_CLA SS") */ class Base...

Save a file as a BLOB with Doctrine

stackoverflow.com - 2012-04-30 16:35:05 - Similar - Report/Block

I use Symfony2 with Doctrine 2.2.2 and a Oracle Database. I want to save a file as a BLOB in the Oracle DB. I wrote a costum Type for Doctrine to have a BLOB Type. It look's like this: class Blob extends Type const BLOB = 'blob'; public function convertToPHPValue($value, AbstractPlatform $platform) return (is_resource($value)) ? stream_g...

How to access the Entity Manager inside of the KnpMenuBundle?

stackoverflow.com - 2012-02-27 13:18:26 - Similar - Report/Block

I am using the KnpMenuBundle and would like to access the Doctrine Entity Manager inside of the menu Builder class. I want to check the database for some different values that might need to appear in the menu. I tried passing the EM through a constructor but it doesn't work. What's the best way to accomplish this? Thanks! Here's the c...

Do Many-To-Many relationships required a "join entity" in Symfony 2 / Doctrine?

stackoverflow.com - 2012-05-08 01:36:56 - Similar - Report/Block

I am starting to understand how Symfony 2 and Doctrine handle many to many relationships, but I am stuck on something, that I seem to have read differing opinions on. Let's say I have an Author entity and a Book entity...with a many-to-many relationship between them. In my database, I represent this with three tables, an authors table, a...

Generated doctrine entities for specific tables

stackoverflow.com - 2012-04-27 18:31:02 - Similar - Report/Block

I am working on migrating a legacy enterprise app to Symfony2. When it is all done we will have dozens of tables. Each application uses a subset of the tables, and we want to keep the tables in 3 databases, not one database per Symfony bundle. Is it possible to use the doctrine command line tools to generate metadata and entities for just...

[Doctrine] Une jointure créée une boucle de Select

developpez.net - 2013-02-22 11:54:04 - Similar - Report/Block

Bonjour, J'ai un petit souci avec une requête que j'ai implémentée dans une classe repository (je précise que je débute en Symfony2 et Doctrine). Je vous expose le problème : ce qui pour moi ne représentait qu'une requête est traitée en 5 requêtes SQL par Doctrine. Voilà le code de ma fonction : Code: public function findHobbiesByUser(\Mc...

[Débutant] Symfony2, Doctrine Jointures

developpez.net - 2013-05-04 09:52:10 - Similar - Report/Block

Bonjour, Je me prends la tête avec le DQL depuis plusieurs jours et je n'avance plus ! Alors j'essaie de créer un système d'articles pour un blog. J'ai donc deux tables : BlogArticles et BlogComments Je souhaiterais donc faire un simple LEFT JOIN sur la table comment de type 'articles.id = comments.article_id', et c'est là ou je bloque. J...

XAMPP и Doctrine - PHP: Фреймворки

cyberforum.ru - 2013-04-24 08:04:40 - Similar - Report/Block

Здравствуйте дорогие друзья, появилась перенести проект с Денвера на XAMPP, на денвере он работал нормально, а вот когда перенес на XAMPP появились проблема php начал ругаться на ф-цию mkdir выдавая такой варнинг. Warning: mkdir(): No such file or directory in D:\xampp\htdocs ctual-test\config\Bootstrap.php on line 182 А у меня там Код: p...


Fill out the form you see below. Registration is free, fast and simple.
If you are already registered, sign in page login.

Web Site :
Required Field
First Name :
Required Field
Last Name :
Required Field
Email :
Required Field
Sex :
Required Field

evolveStar.com is free for ever !

evolveStar.com provides a search engine that allows you to gather information to write their own blog.

evolveStar.com enhances the sources displaying the logo of the site.

If you want to remove your site or you believe a site listed infringes copyright, please report it to: info@evolvestar.com

Specifies the subject copyright violation and the url of the page

evolveStar.com respecting the law DMCA (Digital Millennium Copyright Act) will immediately remove whatever its merits.

Next will be effectual and relevant checks.

Who We Are Partner Advertising Contacts Privacy terms Help & FAQ

© Copyright 2010-2015 Fabrizio Fichera. All rights reserved.