Code Monkey home page Code Monkey logo

typo3-doctrine-orm's People

Contributors

thomaszbz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

typo3-doctrine-orm's Issues

Documentation does not show up at TER

As of released version 1.0.0: Documentation does not show up at TER

Please contact the t3o team in case this does not originate from the code of the extension. I've seen that happen years ago (hopefully not an issue any more).

auswahl_319

Support for @validate annotations

If a model has an @validate annotation, you get the following error:

[Semantical Error] The annotation "@validate" in property Example\ExampleExtension\Domain\Model\ModelName::$propertyName was never imported. Did you maybe forget to add a "use" statement for this annotation? 

You can work around this issue, if you add the @Validate annotation to doctrine. One way would be to create a nearly empty Validate-Annotation class, use it in the model and register it with Doctrines AnnotationRegistry:

<?php

namespace Example\ExampleExtension\ORM\Mapping;

use Doctrine\ORM\Mapping\Annotation;

/**
 * @Annotation
 * @Target({"PROPERTY","ANNOTATION"})
 */
final class Validate implements Annotation
{
	/**
	 * @var string
	 */
	public $name;

	/**
	 * @var mixed
	 */
	public $type = 'string';
}

And within the model

use Example\ExampleExtension\ORM\Mapping\Validate as validate;

DoctrineQuery::setOrderings is inconsistent with extbase

With extbase, the arguments for setOrderings contain the propertyName and the order-direction:

$query->setOrderings([
	'city' => $query::ORDER_ASCENDING,
]);

With a DoctrineQuery, you need to prefix the propertyName with the table-alias, which is always e:

$query->setOrderings([
	'e.city' => $query::ORDER_ASCENDING,
]);

It would be simpler, if DoctrineQuery would add the e-prefix to all ordering-fields:

public function setOrderings(array $orderings)
{
    foreach ($orderings as $field => $dir) {
        $this->queryBuilder->addOrderBy('e.' . $field, $dir);
    }
    return $this;
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.