Comments (4)
@bmitch Could you try this?
use Baum\SetBuilder;
// ...
$node->setConnection('foobar');
$builder = new SetBuilder($node);
$builder->rebuild();
Unfortunately fixing this for you would require an API change (as Node::rebuild is static), so I'd rather work around it for the time being.
from baum.
Thanks @gazsp I will try that. I managed to get around it in my situation (for now) by changing the default DB connection just before I call rebuild() and then setting the default DB connection again just after the call to rebuild().
from baum.
@gazsp I tried your suggestion above but it still fails. I think because of isValidNestedSet()
in Node.php where it creates a new SetValidator:
public static function isValidNestedSet() {
$validator = new SetValidator(new static);
return $validator->passes();
}
It's creating a new static here which is probably the reason the connection is not retained.
from baum.
Under New Management
Focusing support for later Laravel versions.
Cleaning up and closing some of the really old issues. Things that might still be a problem will be transfered to a consolidated issue.
from baum.
Related Issues (20)
- How to get all children with where clause
- PHP 7.1 error HOT 1
- Time to create a new repo?
- Too much data causes updates to fail
- Method Baum\Console\InstallCommand::handle() does not exist HOT 2
- Rewrite unit tests
- Accessing the ancestry/descendancy chain is not easy to use
- Possible bug in descendantsAndSelf() HOT 1
- Laravel 5.5 Compatibility Issues? HOT 1
- L5.6 baum:install issues HOT 2
- Wrong rgt-value when creating child node on PHP 7.2 HOT 2
- BaumCommand is missing
- Invalid Tree
- Get descendants of multiple nodes
- Event Dispatcher Contract fire() method removal support HOT 7
- Looking for maintainers HOT 3
- laravel 7 HOT 4
- Older Issues: Consolidated List
- laravel 7 no migration file creation
- Performance optimisation with Composite Index
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from baum.