I am looking for information on handling search in different ORMs.
Currently I am redeveloping some old application in PHP and one of requirements is: make everything or almost everything searchable, so user just types "punkrock live" and the app finds videos clips, music tracks, reviews, upcoming events or even user comments labeled th...
What's your experience with doctrine?
I've never been much of an ORM kind of guy, I mostlymanaged with just some basic db abstraction layer like adodb.
But I understood all the concepts and benifits of it. So when a project came along that needed an ORM I thought that I'd give one of the ORM framework a try.
I've to decide between do...
I am messing around with Doctrine (version 1.0.3) to see if would make a good fit for the collection of apps I am writing.
I am trying to do a query and return only 3 fields. I am getting the correct fields in one table, but the join table I am getting everything when I only want one field. I have written out the what the SQL should b...
This is one is for any of you Doctrine users out there. I have a PHP CLI daemon process that checks a table every n seconds to find entries that haven't been processed. It's basically a FIFO. Anyways, I always exceed the memory allocated to PHP becuase Doctrine does not free it's resources. To combat this problem it provides free for...
Is it possible have a migration script automatically generate from a table schema in Doctrine?
For example, during heavy development of new features, I will oftern build out my tables first while writing the initial code. I usually don't create a migration to start because the definition of the table may change as the feature is still ...
I'm starting to try and test my Doctrine objects with PHPUnit, and would like to reload the DB from my model objects afresh each time.
My first attempt looks something like this:
class Tests_User extends PHPUnit_Framework_TestCase
{
public function setUp()
{
Doctrine_Manager::connection('mysql://user:pass@localhost/te...
I'm attempting to join a table on itself using doctrine's DQL. The scenario is:
I have a table of product attribute values at is linked to a products table via a reference table. The product attribute values are to serve as filters on the products, therefore, the products attribute values table needs to be joined back onto itself to ...
I know it's a slightly rhetorical question, but I'd like to hear opinions that support or reject this doctrine as it will help me build a better case in my request to not use the dictated solution.
A little background: I develop and maintain a large, mature application (VFP for the UI, Oracle PL/SQL for the middle and back end) that i...
I'm hoping there are some fellow doctrine users out there.
Here is a simplified YAML of my relationships:
Collection:
columns:
id: { type: integer(4), notnull: true, primary: true, autoincrement: true }
name: { type: string(255), notnull: true, unique: true }
relations:
Items:
class: Item
re...
Hello, guys.
Need your advice very much.
We'are working on the PHP project, which was in development for 2+ years, and now the team is ready and feel willingness to switch the development on ORM rails. Because it realy fasts the development and allow you to operate by Objects and not think in terms of SQL code and database tables in mos...
Hello everybody !
Is it possible to add behaviors (eg. actAs Timestampable) in a doctrine migration to avoid defining the created_at and updated_at columns ?
Thank's in advance !
...
I think I must be missing something obvious here. I have Doctrine and Zend Framework set up together. In the bootstrap.php file I have the following - based on the Doctrine documentation for using the profiler:
$profiler = new Doctrine_Connection_Profiler();
$conn = Doctrine_Manager::connection();
$conn->setListener($profiler);
(...)
...
I have a textfield that contains say for example the following text:-
"A traditional English dish comprising sausages in Yorkshire pudding batter, usually served with vegetables and gravy."
This textfield is in a form that simply updates an item record using it's ID. If I edit part of the textfield and replace "and gravy." with "humous...
Let's say that I have YAML scheme looking like that :
Note:
options:
type: MyISAM
collate: utf8_unicode_ci
charset: utf8
actAs: { Timestampable: ~ }
columns:
content: { type: string, notnull: true}
order_id: int(5)
user_id : int
relations:
User:
foreignAlias: Notes
local: user_id
for...
In my ACL fixtures I have resources and actions, most of the resources share common actions like CRUD, is there a way in Doctrine (yaml) to extend another element?
Here is a blurb from my current yaml:
Resource:
R1:
title: Article
system_name: ARTICLE
Actions:
A1:
title: Create
system_nam...
Is there an option in Doctrine that would specify a prefix for any classes generated by doctrine?
I'm having trouble with the new Zend autoloader and autoloading models, the doctrine autoloader doesn't help either.
Ideally I'd have the doctrine generated classes prefixed with 'Model_', as in 'Model_User'.
I ran into this issue while t...
I have the following model :
class Model extends BaseModel
{
public function save($conn = null)
{
if(!$this->getId())
{
//do stuff
}
return parent::save($conn);
}
}
I feel like I am follwing the API description of Doctrine_Record::save() signature (Except the weird parenthesis I would give me...
I'm interested in using Doctrine as an ORM for a new Zend Framework app I'm writing. I'm trying to figure out the best way to integrate it as straightforward as possible. Every example I find is different, and a lot of them pre-date the new autoloading features in ZF 1.8. None of them have worked for me yet.
Does anyone have a good way ...
Hey guys!
Let's imagine something like this:
class MyTable extends Doctrine_Table
{
public function construct()
{
$q = Doctrine_Query::create()->from('MyTable t')
->orderBy('t.creationDate DESC')
->limit(5);
$this->addNamedQuery('top5', $q...
I'm using the PHP Doctrine ORM to build my queries. However, I can't quite seem to figure how to write the following WHERE clause using DQL (Doctrine Query Language):
WHERE name='ABC' AND (category1 = 'X' OR category2 = 'X' OR category3 = 'X')
AND price > 10
How can I specify where the parentheses go?
What I currently have in my PH...