小编Dia*_*blo的帖子

php ORM - RedBean正在制作中?

我想知道你们有多少人在你的php生产网站上使用RedBean ORM,你对它的体验是什么(可靠性,速度,问题(如果有的话),......)?

谢谢.

php database orm

19
推荐指数
1
解决办法
5360
查看次数

Doctrine 2 Native Query从已连接的实体中选择

注意:这是特定于本机查询

我有2个相关的entite " CrmBusinessPartner "和" RefCountry "和" CrmBusinessPartnerRepository "存储库.

CrmBusinessPartner实体

/**
 * CrmBusinessPartner
 *
 * @ORM\Table(name="crm_business_partner")
 * @ORM\Entity(repositoryClass="CrmBusinessPartnerRepository")
 * @Gedmo\SoftDeleteable(fieldName="deletedAt", timeAware=false)
 * @ExclusionPolicy("none")
 */
class CrmBusinessPartner
{
    /**
     *
     * @var integer
     *
     * @ORM\ManyToOne(targetEntity="RefCountry", inversedBy="businessPartners")
     * @ORM\JoinColumn(name="ref_country_id", referencedColumnName="id")
     */
    private $billingCountry;
}
Run Code Online (Sandbox Code Playgroud)

RefCountry实体

/**
 * RefCountry
 *
 * @ORM\Table(name="ref_country")
 * @ORM\Entity
 */
class RefCountry
{
    /**
     * @ORM\OneToMany(targetEntity="CrmBusinessPartner", mappedBy="billingCountry")
     */
    private $businessPartners;

    public function __construct()
    {
        $this->businessPartners= new ArrayCollection();
    }
}
Run Code Online (Sandbox Code Playgroud)

在" CrmBusinessPartnerRepository "存储库中有这个工作代码: …

symfony doctrine-orm symfony-2.5

10
推荐指数
1
解决办法
1万
查看次数

标签 统计

database ×1

doctrine-orm ×1

orm ×1

php ×1

symfony ×1

symfony-2.5 ×1