Okay, I figured out what was wrong:

1. To make crud create produce a drop-down select for the reference
field, I needed to add a "requires is_in_db" statement referencing the
same table. That was a dumb oversight on my part.

2. The crud read needed to be replaced by a custom query using
with_alias. It might be possible to simply modify the standard crud
read statement, but I'm not sure how.

Regards...>Jeff

On Jan 12, 3:53 pm, SaltyCow <jeff.bienkow...@gmail.com> wrote:
> Hello there...
>
> I'm hoping that this is a common problem with a simple solution.
>
> I'm attempting to create an app that uses self-referencing tables, in
> one case to refer to employees and their managers (who themselves are
> also employees). I used the app wizard to generate the scaffolding. I
> am able to add records, but the boilerplate crud read and crud select
> functions return the following error: Using a recursive select, but
> encountered a broken reference. Also, the form generated by the crud
> create function does not generate a drop-down selection box as it
> normally would for a reference field.
>
> So, my question is, really, do I need to write custom crud functions
> to work with self-referencing tables and, if so, does anyone know the
> best way to do this? I've read the part in the docs about using
> "with_alias" but I can't seem to make heads or tails of it. (Not a
> problem with the manual, just my limited knowledge of SQL.)
>
> I'd appreciate any further direction anyone can give me.
>
> Thanks...>Jeff

Reply via email to