buffer the first resultset and use a setter at the objects of the first
resultset to set the child result set
--
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com
Hey all,
Just to butt in here, this is how I do it:
*Hypothetical situation:*
*Entities:*
PhoneNumber
Company
Person
*Relations:*
Companies can have many PhoneNumbers
Persons can have many PhoneNumbers
The same PhoneNumber can belong to multiple Companies
The same PhoneNumber can belong to
Hi,
Yeah, I just use an adapter that I inject into mappers, I don't use Zend/Db
stuff. I find it much easier to maintain and debug this way.
From my point of view this is all that is needed. All my mappers do is
query the db and return the models, I use service classes to utilise the
mappers and
FYI a code view of my approach. Drill down to see Mapper.php:
https://bitbucket.org/latterd/smodels/src/d86fb69051235b33ce4bfba3078b5c0336d86c03/vendor/Supa?at=master
On 22 May 2013 16:13, Daniel Latter dan.lat...@gmail.com wrote:
Hi,
Yeah, I just use an adapter that I inject into mappers, I
So is nobody developing applications like this anymore? If not i'd love to
know the better way that everyone else is doing it.
--
View this message in context:
http://zend-framework-community.634137.n4.nabble.com/zf2-one-many-to-many-relationships-tp4659910p4660085.html
Sent from the Zend
I just use mappers that contain simple methods like getProductCategories, on a
Category mapper for example, this method will then just use the bridge table in
its sql, I don't use a separate mapper. I do however make sure I implement the
method in question in a mapper that matches the type I am
ok, so you have one mapper that communicates with two seperate tables (even
if the second table just contains, for instance, 2 columns (foreign keys))?
So i'm assuming that is two seperate TableGateway instances? Or you just
have an adapter with custom sql queries?
--
View this message in
Hi, i'm hesitant about having a mapper write a query to two seperate tables.
Although i can see why it would be tempting to do so. For instance in a
many-to-many relationship, the joining table is only likely to contain two
columns (both being foreign keys, pointing to separate tables), and having
what i have tried till now is that... if you want a user object with post
values populates, make a query on user table with join on post. you have to
modify your user mapper to get the value for post. This works one way you
can get the values but cant use it to insert the values. its a workaround
http://ralphschindler.com/2010/11
This might be a solution to your problem.
Or what i uderstood is you can create a new mapper and entity for this type
of relationship and inserting value back in database means write a custom
save method which will obviously involves two queries
--
View this
yes, a non-doctrine, zf only solution
--
View this message in context:
http://zend-framework-community.634137.n4.nabble.com/zf2-one-many-to-many-relationships-tp4659910p4660062.html
Sent from the Zend Framework mailing list archive at Nabble.com.
--
List: fw-general@lists.zend.com
Info:
@Jeremiah he is asking specifically for a Zend\Db solution...
Marco Pivetta
http://twitter.com/Ocramius
http://ocramius.github.com/
On 12 May 2013 07:50, Jeremiah Small m...@jsmall.us wrote:
I like Doctrine 2 module.
Jeremiah
On May 11, 2013, at 7:04 PM, tonystamp
Anyone got any pointers on the best way to achieve the above? Not many
tutorials out there on the subject for zf2.
--
View this message in context:
http://zend-framework-community.634137.n4.nabble.com/zf2-one-many-to-many-relationships-tp4659910p465.html
Sent from the Zend Framework
I like Doctrine 2 module.
Jeremiah
On May 11, 2013, at 7:04 PM, tonystamp tonyst...@hotmail.co.uk wrote:
Anyone got any pointers on the best way to achieve the above? Not many
tutorials out there on the subject for zf2.
--
View this message in context:
14 matches
Mail list logo