View more context

 

Tamara

Hi all, how can I change the table name for a many many relationship (SS 4.3)? I need to change it, because the automatically generated table name is too long (and MySQL is throwing an error because of that)

wmk

good question @Tamara. you could at least refactor to a "manymany through"

wmk

but.. why is it so long? didn't you specify table names for your dataobjects so the tables are with full namespace? Can you paste an example table name?

Tamara

I didn't specify table names, at first. I just did, and that fixed it

💯 (1)
wmk

just had a look, you cannot configure the join table name directly.

mmativ

There’s any way to get the page on nested data object? its like Level(1)

wmk

@mmativ what do you mean? can you please explain? Do you mean the current Page? in template or in PHP?

mmativ

In PHP, yeah its like $CurrentPage on nested data object

wmk

Controller::curr() returns the current controller, which has the curernt page. Either directly (magic), or via Controller::curr()->data()

nils

This filename returns 404 unless you're logged in as admin: 58626445408_F0305A06-D40E-45AF-809A-3FA4C4DE990A.MOV