I'm working with the Symfony Framework,
I have installed the sfDoctrineGuardPlugin. I already have my own homepage design and I'm trying to embed my sfGuardAuth signin/login fields into my homepage. I want them to use my homepage design too.
I paste this into one of my table rows: <?php echo $form['username']->render() ?>
which is bas...
I'm getting a weird error in symfony 1.4 with doctrine 1.2. My schemas seem to be normal. But whenever I execute the doctrine:build --all --no-confirmation --and-load task, it would output the error SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'default_edition_id' cannot be null. If I set notnull to false for the default_...
I want to make a deep copy/clone of a doctrine record in a symfony project.
The existing copy($deep)-method doesn't work properly with $deep=true.
For an example let's have a look at a classroom lesson. This lesson has a start and end date and between them there are several breaks. This classroom is in a buildung.
lesson-break is a one...
I am creating an application, built with PHP, MySQL and Doctrine v1.2, that deals with ordered groupings of items, which can contain different types of items. For example, the group My Last Vacation can have images, video and textual notes. These items would be sortable so that they appear in the order that the end user specifies.
Eac...
Hi,
Does anybody can get me started on using fixtures in doctrine 2? In doctrine 1 this was easy. But in the doctrine 2 documentation there's nothing I can find about fixtures.
Thanks.
...
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\ArrayInput(
array(
'migrations:migrat...
Following situation:
Parent:
namespace Base;
/** @Entity @Table(name="section") */
class Section extends Skeleton {
/**
* @Id @Column(type="integer")
* @GeneratedValue(strategy="AUTO")
*/
protected $id;
/** @Column(length=256) */
protected $title;
/** @Column(length=256) */
protected $stylesheet;
}
Child:
namespace Base2;
u...
For a website i'm building I need to check wether a location has contracts, these locations can have contracts linked directly to them or when there part of a larger organisation also have contracts that are linked to the organisation.
I am trying to use a DQL query to first check if there are contracts linked directly and then if there...
How can I execute following command line code in an ant build file?
cd backend/doctrine/
export PC_ZEND_ENV=testing
php doctrine migrations:migrate << EOF
y
EOF
The solution
With the feedback I've got I figured out the following working exec command.
<exec dir="backend/doctrine" executable="php">
<env key="PC...
When configuring my admin generator I created a table_method for my list view in order to join the correct tables and so on.
However, in my edit post / create post sections I have a rather extensive dropdown that is not joined at the moment. Is there an equivalent to table_method that I can use for these situations to specify the method...
I'm confused about how DQL works, and really need some help here.
I have three tables, called "Band", "Agent", and "BandAgent".
BandAgent is the middle table for a Many-to-many relationship, containing agent_id and band_id.
How can I retrieve all Agents related to a specific band_id using a DQL statement?
EDIT
This code works, but...
i am having problems persisting a Doctrine 2 entity (Post) when the User is logged in with Zend_Auth.
i am quite sure its the login as the code runs, when the user is logged out, and fails once the user is logged in. and it seems that the identity returned from the Zend_Auth::authenticate() plays a role in affecting the error message. ...
I use Zend_Db in some project, I discover Doctrine there is a while but never actually used it.
What are the advantage of Doctrine over Zend_Db ? What are the benefits to use Doctrine ?
By the way, is it easy to use Doctrine with Zend Framework 1.10.7? Integration and use with the other component ? As it doesn't seem to exist a Doctrin...
In the modules actions, what is the best way to select records based on an index other than the primary key id?
$this->city = Doctrine::getTable('City')->find(array($request->getParameter('city')));
This always returns a query with WHERE City.id= instead of WHERE City.city=
Do I have to do something like
$q = Doctrine_Query::create(...
i am using Zend Framework. some techniques i use currently
Zend_Debug::dump() (+die())
Zend_Log: to firebug/firephp
i particularly like the log to firebug, but when logging large objects, eg. doctrine 2 models (with many associated objects etc), i find that it slows down and crashes alot.
what alternatives are out there?
i curre...
Hey I have some problems creating my query into doctrine:
My sql query looks like this:
select *
from fs_employee
where role_id = ?
and
id not in
(select e.id
from fs_employee e, fs_plane p
where role_id = ?
and p.pilot_id = e.id
and e.player_id = ?
)
So bassicaly I want to select every pilot employee with role_id = 20 that has not b...
Hello,
My application based on Zend Framework and Doctrine includes > 300 files on each request. They are mostly the same files.
This is a quite huge overhead. Partially solved by Zend_Cache (and Memcache), but not all the pages may be cached.
How to reduce this number? How to speed up?
Doctrine has an option to compile the needed ...
i am using DoctrineExtensions\NestedSet
i am trying to render children nodes. i used
$node->getChildren();
array
0 =>
object(DoctrineExtensions\NestedSet\NodeWrapper)[218]
private 'node' =>
object(Application\Models\Post)[240]
protected 'id' => int 3
protected 'title' => string 'trying to use...
I'm looking for a way to let Doctrine generate getters and setters for me, because otherwise it will call the Doctrine_Record "get" method which costs a lot of time.
so is there a chance to do that?
...
I cant find Doctrine_Pager in Doctrine2 and really need a way to page my query results. Is there a way to use some alternative pager (Pear, Zend)? Please post some example code as well if solution is available. Google didnt helped me, so hope folks will :)
...