addSelectColumns with alias?

View: New views
3 Messages — Rating Filter:   Alert me  

addSelectColumns with alias?

by Bálint Kriván :: Rate this Message:

| View Threaded | Show Only this Message

Hiho!

I'm looking for something like this: TablePeer::addSelectColumns(), BUT with aliased table. Is it possible? Or I have to implement this? (Probably: addSelectColumnsWithAlias($c, $alias))
Shouldn't we add this to the BasePeer builder?

Regards,

--
Kriván Bálint

Re: addSelectColumns with alias?

by hozn :: Rate this Message:

| View Threaded | Show Only this Message

Hi -

Yes, you're right -- this doesn't exist yet.  If you want to propose
your implementation, we could maybe add this in.  (though we are going
to revisit how aliased tables work for next version)

Hans

Bálint Kriván wrote:

> Hiho!
>
> I'm looking for something like this: TablePeer::addSelectColumns(),
> BUT with aliased table. Is it possible? Or I have to implement this?
> (Probably: addSelectColumnsWithAlias($c, $alias))
> Shouldn't we add this to the BasePeer builder?
>
> Regards,
>
> --
> Kriván Bálint


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: addSelectColumns with alias?

by Bálint Kriván :: Rate this Message:

| View Threaded | Show Only this Message

Hi,

My solution was this:
- new method from addSelectColumns
- replaced the ...Peer::SOME_COLUMN with ...Peer::alias(...)

I think it would be great if it would be implemented in propel by default :)

Regards,
Balint

On 2/20/08, Hans Lellelid <hans@...> wrote:

> Hi -
>
> Yes, you're right -- this doesn't exist yet.  If you want to propose
> your implementation, we could maybe add this in.  (though we are going
> to revisit how aliased tables work for next version)
>
> Hans
>
> Bálint Kriván wrote:
> > Hiho!
> >
> > I'm looking for something like this: TablePeer::addSelectColumns(),
> > BUT with aliased table. Is it possible? Or I have to implement this?
> > (Probably: addSelectColumnsWithAlias($c, $alias))
> > Shouldn't we add this to the BasePeer builder?
> >
> > Regards,
> >
> > --
> > Kriván Bálint
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>


--
Kriván Bálint