Google Groups Home
Help | Sign in
creating custom / additional fields
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
  3 messages - Collapse all
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
debtman7  
View profile
 More options 2 Jul, 21:38
From: debtman7 <debt...@gmail.com>
Date: Wed, 2 Jul 2008 13:38:34 -0700 (PDT)
Local: Wed 2 Jul 2008 21:38
Subject: creating custom / additional fields

Hi,

I'd like to have something like a calculated field in my record
object, something that is figured out by php rather than actually part
of the data. I know I can do this with a Listener implementing a
preHydrate call, but is there a simpler way to do it? Seems a bit
convoluted to create a new class just to implement a listener that
sets one variable. Is there something I can just put in my class to do
this, the equivalent of rails:

class ...

  def specialfield
    ...

where I can then call class.specialfield. I tried this in php and it
does work but you have to call the method as a method, and we're
encoding this to sent to a javascript ajax request so I need it to
actually be considered a data item and not a method I can call on it.


    Reply to author    Forward  
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.
Jonathan Wage  
View profile
 More options 3 Jul, 14:38
From: "Jonathan Wage" <jonw...@gmail.com>
Date: Thu, 3 Jul 2008 08:38:39 -0500
Local: Thurs 3 Jul 2008 14:38
Subject: Re: [doctrine-user] creating custom / additional fields

Currently the only way is with a hydration listener. Maybe this is a feature
worth implementing though. Can you create a ticket to record it? we can talk
about it for a future version.

Thanks, Jon

--
Jonathan Wage
http://www.jwage.com
http://www.centresource.com

    Reply to author    Forward  
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.
debtman7  
View profile
 More options 3 Jul, 19:26
From: debtman7 <debt...@gmail.com>
Date: Thu, 3 Jul 2008 11:26:11 -0700 (PDT)
Local: Thurs 3 Jul 2008 19:26
Subject: Re: creating custom / additional fields

Hi,

I submitted a ticket for it.

FYI, the way I've gotten around this currently is to have a global
HydrationListener at the connection level that checks to see if the
Invoker has a preHydrate method and calls it if it does, passing the
data by reference. Not ideal but it does what we need for now.

On Jul 3, 9:38 am, "Jonathan Wage" <jonw...@gmail.com> wrote:


    Reply to author    Forward  
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 »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google