Hello ORM/DBAL heroes,
I'm having two minor troubles with the ORM 2.4.* and DBAL 2.3.* functions.
I'm implementing a little database backup tool for our app
(http://volkszaehler.org). Part of the functionality- which DBAL gracefully
seems to offer- will be migrating from a MySQL DB to SQlite
I have a table with a composite primary key. For historic reasons (pre
DDC-117) this is implemented as a simple PK plus a unique index:
/**
* @Entity
* @Table(
* name=test,
* uniqueConstraints={
* @UniqueConstraint(name=test_unique, columns={entity_id,
pkey})
*
The problem is this:
$diffTable-dropPrimaryKey();
$diffTable-setPrimaryKey(array('foo'));
In MySqlPlatform-getPreAlterTableIndexForeignKeySQL the removedIndexes
are checked for auto columns. As the primary index is dropped only to be
added again, the auto column is not
I have a simple ER diagram with entities and properties 1:n. Retrieving an
entity by its uuid will also obtain all it's properties:
$dql = 'SELECT a, p
FROM Volkszaehler\Model\Entity a
LEFT JOIN a.properties p
WHERE a.uuid = :uuid';
$q = $em->createQuery($dql)
->setParameter('uuid', $uuid);
Update: I've found that using
$this->em->refresh($entity);
after the additional query does make the last query return all properties
again.
I still find this behaviour highly confusing. Why shouldn't the last query
always return a fully populated entity instead of a partial object?
Thanks,
I have Entites and Aggregators which are entities with children. When
retrieving entities I'd like to eagerly fetch children for entities of type
aggregator:
$dql = 'SELECT e, p
FROM Volkszaehler\Model\Entity e
LEFT JOIN e.properties p
WHERE e.uuid = :uuid';
$q =
Thanks for the clarification and for your time. Have updated the query to
fully populate the entity.
Best regards,
Andreas
On Friday, August 25, 2017 at 9:12:59 AM UTC+2, Marco Pivetta wrote:
>
> On Wed, Aug 23, 2017 at 9:29 AM, Andreas Goetz <cpu...@gmail.com
> > wrote
Unfortunately the problem still exists. Even updating the Aggregator
children annotation like this:
@ManyToMany(targetEntity="Entity", inversedBy="parents", fetch="EAGER")
does not lead to the children being loaded eagerly.
What am I doing wrong here?
Thanks,
Andreas
--
You received
I've had this on 2.5 already, and still on 2.6. But thank you for
confirming that this should work even with a discriminator map- I'll need
to continue investigation.
Thanks,
Andreas
--
You received this message because you are subscribed to the Google Groups
"doctrine-user" group.
To