1:1 relationship support

Wish to see a specific feature/change in future releases? Feel free to post it here, and if it gets enough "likes", we'd definitely include it in future releases!
Post Reply
grimblefritz
AppGini Super Hero
AppGini Super Hero
Posts: 336
Joined: 2015-12-23 16:52

1:1 relationship support

Post by grimblefritz » 2022-12-11 21:39

Ahmed indicated back in 2019 that 1:1 support was coming soon.

Any update as to when soon will arrive?

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1807
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: 1:1 relationship support

Post by jsetzer » 2022-12-11 21:46

do you mean n:m instead of 1:1?
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

grimblefritz
AppGini Super Hero
AppGini Super Hero
Posts: 336
Joined: 2015-12-23 16:52

Re: 1:1 relationship support

Post by grimblefritz » 2022-12-12 14:27

Sure, if n=1 and m=1

grimblefritz
AppGini Super Hero
AppGini Super Hero
Posts: 336
Joined: 2015-12-23 16:52

Re: 1:1 relationship support

Post by grimblefritz » 2022-12-12 14:32

The thread I was referencing viewtopic.php?f=11&t=3100

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1807
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: 1:1 relationship support

Post by jsetzer » 2022-12-12 15:00

Thanks for the link. Now we know what you were referring to.
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1807
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: 1:1 relationship support

Post by jsetzer » 2022-12-12 15:10

grimblefritz wrote:
2022-12-11 21:39
Ahmed indicated back in 2019 that 1:1 support was coming soon.

Any update as to when soon will arrive?
Wouldn't it be easiest to deny insert into Table B if there is an existing record, already? Could be done in standard.

For example:
1) Revoke Insert permission for Table B.
2) on after insert into Table A, auto-create a record in Table B, using the primary key of (the new) Table A record.

This should do it on database side.

Now in UI you may want to get rid of the default children tab. This can be done in AppGini model. Instead, you may want to embed Table B's Detail View into Table A's Detail View, or you need a button in Table A's Detail View, opening Table B's Detail view. Primary key in Table B should be identical with $selectedID in this scenario.
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

grimblefritz
AppGini Super Hero
AppGini Super Hero
Posts: 336
Joined: 2015-12-23 16:52

Re: 1:1 relationship support

Post by grimblefritz » 2022-12-13 18:32

That's more or less where I've been heading:

1) sibling pk == primary pk (and is of course unique)

2) insert the sibling record (records, as there are in reality a dozen sibling tables) when the primary record is created

3) add links or buttons to the primary detail view to open the sibling detail views

That's the view from the moon. I'm sure it will be more involved than that.

Post Reply