Suggestions: colname and set

17 views
Skip to first unread message

Paul Johnston

unread,
Nov 6, 2007, 5:49:50 AM11/6/07
to sqle...@googlegroups.com
Hi,

I've recently switched a fairly big app from ActiveMapper to Elixir and it is working great. I really like being able to define foreign keys and two-way relations in a single step. Got a couple of suggestions:

1) My database names fkeys using an "id" suffix, not "_id" as Elixir defaults to. At the moment I have to manually specify colname on each ManyToOne. What would be great is to tell Elixir once that the format is "xxxid".

2) ActiveMapper had a "set" method, which was quite convenient, although Elixir doesn't have this.

Any chance of adding these features? If people think they're a good idea, I can produce a patch.

Paul

Gaetan de Menten

unread,
Nov 6, 2007, 5:58:46 AM11/6/07
to sqle...@googlegroups.com
On 11/6/07, Paul Johnston <p...@pajhome.org.uk> wrote:

> I've recently switched a fairly big app from ActiveMapper to Elixir and it
> is working great. I really like being able to define foreign keys and
> two-way relations in a single step.

That's always nice to hear!

> Got a couple of suggestions:
>
> 1) My database names fkeys using an "id" suffix, not "_id" as Elixir
> defaults to. At the moment I have to manually specify colname on each
> ManyToOne. What would be great is to tell Elixir once that the format is
> "xxxid".

Yes, that would be nice. I'd probably just move the format string to
be a global variable, so that people can override it if they want to
(I'm assuming people usually want the same format across their whole
app, so I think an entity option would be too much trouble). Or did
you have something else in mind?

> 2) ActiveMapper had a "set" method, which was quite convenient, although
> Elixir doesn't have this.
>
> Any chance of adding these features? If people think they're a good idea, I
> can produce a patch.

Sure, please do.
--
Gaëtan de Menten
http://openhex.org

Paul Johnston

unread,
Nov 6, 2007, 7:28:48 AM11/6/07
to SQLElixir
Hi,

> Yes, that would be nice. I'd probably just move the format string to
> be a global variable, so that people can override it if they want to

Ok, I've put a potential patch on ticket #21, which can be a starting
point.

Paul

Gaetan de Menten

unread,
Nov 9, 2007, 5:00:56 AM11/9/07
to sqle...@googlegroups.com

This is committed (with modifications). Thanks.

Paul Johnston

unread,
Nov 12, 2007, 12:27:31 PM11/12/07
to SQLElixir
Gaetan,

> > Ok, I've put a potential patch on ticket #21, which can be a starting
> > point.

> This is committed (with modifications). Thanks.

Your changes look great. Thanks for taking the time to deal with this.

Paul

Reply all
Reply to author
Forward
0 new messages