Access to breadcrumb in request object when overriding routes

Hi All -

Is there a way to access the FA user’s current breadcrumb location from within a route override? We’re trying to save a secondary association but need to know the FA user’s navigation location set that association up correctly. Thanks!

Adam

Hi @a.strom,

Can you please elaborate, maybe in a more functional way, the task you are trying to achieve?

Thanks

Hi @Sliman_Medini -

Sure thing. We have a few model classes that each have two separate N:M polymorphic associations. Sequelize provides the necessary values for the link table for one of those associations when we save a new instance in FA. However, we need to populate the link table with a second set of values for the second association.

As an example, imagine metadata that can be assigned to either a book or a movie. In addition, that metadata can belong to a user or a group (all these are belongsToMany associations in Sequelize). If we’re creating metadata for a book that, in our use-case, is currently checked out to a user, Sequelize provides FA the values to fill in the Metadata <-> Book relationship, but not the Metadata <-> User relationship.

If we had access to the breadcrumbs, we’d be able to see if the book metadata was being created after drilling down through a user or a group and correctly set up that second association.

Hope this helps!

Adam

Thanks you for this explanation, I start to see more :slight_smile:

I understood you can simplify your model like this: User 1 ----> * Tag * <---- 1 Book
So:
-One book has many tags
-One user has many tags

To go further, can you please share more elements?
-your db schema and your forest model
-the description of the use-case you want to achieve (since I am still not sure about it sorry)

Hi @Sliman_Medini -

Thanks for your response. I’ve been abstracting away from our actual schema to protect our implementation’s details, but to clarify the associations: a book may be owned by either a user OR a group; a metadatum may be owned by a user OR a group; a metadataum may be assigned to either a book OR a movie.

We’re a premium customer and I’ve worked with @Steve_Bunlon with this setup previously, so I think we’ll have to take this out of the public community to discuss further. I’ll reach out through support channels and go from there.

Thanks again for your help,

Adam

Hello @a.strom :wave:

Sadly we do not provide any information regarding the breadcrumbs (or actual navigation history through data) in our requests to your generated project.

However, I see how helpful it could be for you in this case, and this looks like a feature that might serve others too.

I have pushed this feature request to our productboard :raised_hands:

Sorry for the inconvenience, and thanks a lot for your feedback :smiley:

Steve.