Yii Framework Forum: Integrating An External Orm Framework In Yii2 - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Integrating An External Orm Framework In Yii2

#1 User is online   msoa 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 234
  • Joined: 15-August 12

Posted 07 March 2013 - 04:04 PM

Hi there,
I very searched about this issue in forum and didn't find a suitable subject for it, there was only amount content scattered. The reason that i want to start a new thread.

Now,
Is there a plan for integrate an external ORM framework like Doctrine/Propel/... in Yii2 ?
0

#2 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 3,133
  • Joined: 17-January 09
  • Location:Russia

Posted 07 March 2013 - 06:38 PM

No.
Yii 1.1 Application Development Cookbook

Enjoying Yii? Star us at github: 1.1 and 2.0.
0

#3 User is online   msoa 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 234
  • Joined: 15-August 12

Posted 07 March 2013 - 10:24 PM

View Postsamdark, on 07 March 2013 - 06:38 PM, said:

No.

Can i know, Why shouldn't there be such a feature? Or what's the Yii dev team reason don't it?
And you think existent extensions do it well?
Such a feature could be to attract a lot of users. Don't you think so?

Regards
0

#4 User is offline   Haensel 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 444
  • Joined: 14-January 11
  • Location:Vienna (Austria)

Posted 08 March 2013 - 02:39 AM

Yii 2 will have composer support so adding Doctrine (or other ORMs) to your project would then be a matter of adding

{
    "require": {
        "doctrine/orm": "*"
    }
}


to your composer.json. That might be sufficient for a lot of cases
1

#5 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 3,133
  • Joined: 17-January 09
  • Location:Russia

Posted 08 March 2013 - 06:32 PM

We have our own and nothing prevents you from using Doctrine with Yii.
Yii 1.1 Application Development Cookbook

Enjoying Yii? Star us at github: 1.1 and 2.0.
1

#6 User is online   msoa 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 234
  • Joined: 15-August 12

Posted 08 March 2013 - 09:45 PM

View Postsamdark, on 08 March 2013 - 06:32 PM, said:

We have our own and nothing prevents you from using Doctrine with Yii.

Ok, Is better the integrating by other people be easy.

Best Regards
0

#7 User is offline   Shahcheraghean 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 478
  • Joined: 12-December 12
  • Location:Mashhad, IRAN

Posted 12 March 2013 - 02:02 AM

so, at last, dose the Yii use any ORM or integrate in it for itself?
www.shgn.ir
www.shgn.ir/yii-framework/
yii2.swsco.ir
In a world without any fences or walls,Who needs Gates or Windows!
0

#8 User is offline   Haensel 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 444
  • Joined: 14-January 11
  • Location:Vienna (Austria)

Posted 12 March 2013 - 03:37 AM

Of course it does (see samdark's answer above). It's just that ONE core ORM is enough and Yii's ActiveRecord implementation is/was one of the best parts of the framework. If you want to use something else (Doctrine, Eloquent etc.) you will have to add it on your own (with composer making this fairly straight forward I guess). You may have to use the Facade pattern though to allow a seemless integration into Yii (like configuring it through your app's config file etc.) but this is a whole other story
0

#9 User is offline   Shahcheraghean 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 478
  • Joined: 12-December 12
  • Location:Mashhad, IRAN

Posted 12 March 2013 - 04:09 AM

OK,
in some posts that I've read later, the Yii ORM can't implement the joined tables all in once.
www.shgn.ir
www.shgn.ir/yii-framework/
yii2.swsco.ir
In a world without any fences or walls,Who needs Gates or Windows!
0

#10 User is online   ORey 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,634
  • Joined: 20-April 09
  • Location:Moscow, Russia

Posted 12 March 2013 - 04:44 AM

View PostShahcheraghean, on 12 March 2013 - 04:09 AM, said:

OK,
in some posts that I've read later, the Yii ORM can't implement the joined tables all in once.


Yii's ORM can do very complicated queries, including aggregates. I think there was some mistake in what you've read.
God is real unless declared as integer
0

#11 User is offline   Shahcheraghean 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 478
  • Joined: 12-December 12
  • Location:Mashhad, IRAN

Posted 14 March 2013 - 02:58 AM

View PostORey, on 12 March 2013 - 04:44 AM, said:

Yii's ORM can do very complicated queries, including aggregates. I think there was some mistake in what you've read.

i know.
that you said is for joins, selects etc. but what about insert and update?
please read here:http://www.yiiframework.com/forum/index.php/topic/32511-stable-solution-for-saving-relational-active-record/
www.shgn.ir
www.shgn.ir/yii-framework/
yii2.swsco.ir
In a world without any fences or walls,Who needs Gates or Windows!
0

#12 User is offline   Tropi 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 73
  • Joined: 30-November 11

Posted 14 March 2013 - 06:11 PM

This issue has been mentioned a lot and was already confirmed. In fact on the Yii2 Roadmap on github (https://github.com/y...lopment-Roadmap) it even says:

Quote

Ready January 20, 2013
New design and implementation of Active Record and Relational Active Record.

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users