Is this a bug or intended behaviour? (Select relationship)
So i got the following select field, do note that 'full_name' is an virtual column:
Just to be sure the virtual column:
But when i got a Resource where the already select Ram is not active anymore it doesn't show the 'full_name' but the ID of that Ram.
I would suspect that it would still show the 'full_name' cause i see no reason why not.
I got it fixed myself though by adding the following, but again i think it shouldn't have to:
This shows the 'full_name' even though the Ram is not active anymore.
14 Replies
Use
Select::make('ram.full_name')
i dont think so, thats table syntax
its weird
feels like something is wrong with the storedAs
can you try simple concatenation instead of the ||
That is concatenation
ive seen
$table->string('full_name')->virtualAs('concat(first_name, \' \', last_name)');
just something simple like thatItβs Postgres syntax I think
oh, ew
Yea it's Postgres
Im making a big data platform, so Postgress seemed smarter
Postgres always seems smarter π
Yea still not sure if it's the right way, first time i use Postgres. And since im still in the development fase i can't really see the difference
So i hope that in the end it's the right choice
This doesn't solve it btw
Out of interest, is 'active' false/0 or null on the problematic rows?
false/true
Did you end up solving it?
@busybeard ?
@milkmannetje thanks for the mention π
@toeknee_iom & @milkmannetje this is what i end up with
Deleted the first Wherehas, thats some code im still working on π