staudenmeir/laravel-adjacency-list

Problem with custom path

byChamaco opened this issue · 2 comments

Hello,

When I make a custom path for a relationship that has a multiples ancestors, the new field that is created has a max characters which causes the path to be cut.
For example: "Car > Motorbike > Bus > Airplane" it transforms in "Car > Motorbike > Truck > Airp".

This happens because when a varchar is cast, by default SQL adds a maximum of 30 characters.

So that there is no maximum number of characters, you should replace the varchar with varchar(max) in the following file src/Query/Grammars/SqlServerGrammar.php and mainly this part:

image

Thank you so much

Greetings

Hi @byChamaco,
Thanks, I released a new version.

Hi @staudenmeir,
Perfect, thank you very much.