Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Add new fields to another Bundle's entity
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Adrian Schneider  
View profile  
 More options Oct 5 2012, 4:26 am
From: Adrian Schneider <siradr...@gmail.com>
Date: Fri, 5 Oct 2012 01:26:30 -0700 (PDT)
Local: Fri, Oct 5 2012 4:26 am
Subject: Add new fields to another Bundle's entity

I'm working on a project which requires quite a lot of pieces which will be
used in various combinations on different installations.  I'd like to break
these down into bundles, but I'm stuck on how to deal with the entity
extensions.  Without doctrine this is very simple: add new columns or
tables to the database.  

Example: ForumBundle/Entity/Topic
I want to add  ForumTaggingBundle/Entity/Tag and
ForumVotingBundle/Entity/Vote.  Both have bi-directional relationships with
the Topic entity.  However, the Topic entity is more or less read only
(let's assume it's a vendor file)

Without digging too much I assume this is possible at the mapping level
(perhaps with a little custom code).  However, I'm not sure how to handle
the entities themselves yet. I  don't want to extend it because I can only
do that once.  Any suggestions on how I can solve this?  I have a few
unvalidated ideas, but I'd like some feedback on which is the most viable.

- Magic (__call) ? :(
- Generated file before proxy generation?
- Built in field as an extension point?

Any help would be appreciated.  I'd like to leave options open between
ORM/ODM, so something that doesn't break the abstraction would be super.  


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Xeross N/A  
View profile  
 More options Oct 5 2012, 7:42 am
From: "Xeross N/A" <xer...@theelitist.net>
Date: Fri, 5 Oct 2012 13:41:57 +0200
Local: Fri, Oct 5 2012 7:41 am
Subject: Re: [Symfony2] Add new fields to another Bundle's entity
You might want to check out
http://docs.doctrine-project.org/en/2.0.x/reference/inheritance-mappi...
however you'll have to use the new entity wherever you want the
additional fields to be available (I think).

2012/10/5 Adrian Schneider <siradr...@gmail.com>:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adrian Schneider  
View profile  
 More options Oct 5 2012, 12:42 pm
From: Adrian Schneider <siradr...@gmail.com>
Date: Fri, 5 Oct 2012 09:42:42 -0700 (PDT)
Local: Fri, Oct 5 2012 12:42 pm
Subject: Re: [Symfony2] Add new fields to another Bundle's entity

Hey,

I've been looking at that this morning.  It looks like the other viable
option I've forgotten is to use the mappedSuperClass, and have users
copy/paste the additional fields / mapping information into the (now
required) application-space extended bundle.

Acme\ForumBundle\Entity\Forum would require adding the addTag(),
removeTag(), etc. fields, and then the ForumTaggingBundle could supply a
Taggable interface so we can still have some clean code organization.  I'm
a little confused on how to properly apply the relationship mapping this
way, but it looks like it'll work.

It would have been handy if there was an extension point in the
ProxyFactory so I can generate entities before proxies are created.

Thanks


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mohammad Tushar  
View profile  
 More options Oct 18 2012, 7:58 am
From: Mohammad Tushar <nrbtus...@gmail.com>
Date: Thu, 18 Oct 2012 04:58:01 -0700 (PDT)
Local: Thurs, Oct 18 2012 7:58 am
Subject: Re: Add new fields to another Bundle's entity

Hi there,

I am new in symfony2.1. I am using wamp server (apache 2.2.22 and php
5.3.13).  I have configured everything properly for symfony2.1. but problem
happen when I am  trying to retrieve data from database . Sometimes its
work properly but sometime it doesn’t work. Than I have to restart the
server.

To solve that I have installed apache, php and mysql separately. But still
I am facing the same problem.

Please give me a solution.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »