What are the Slack Archives?
Itβs a history of our time together in the Slack Community! Thereβs a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you wonβt be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
Hi, is it possible to access DB from service layer?
Comments
-
Yes with
Propel::getConnection()
. But it depends in which application your service layer runs and therefore is not a good idea to use the DB in the service.Service layer is meant to wrap 3rd party libraries and to implement functionality that is shared between Yves/Glue and Zed, while in the standard setup only Zed provides a DB access.
So in general if you have a DB access that's a strong indicator that you should not put that code in the service layer but into Zed instead and call it from Yves/Glue via the Client layer through Zed Gateway Controller endpoints
0 -
You are right, but it is a code that I have to deal with π
0 -
thanks for the feedback
0 -
It turned out the business requirement did not need that exactly so we were safe this time π
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 76 Spryker News
- 929 Developer Corner
- 787 Spryker Development
- 89 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 26 Job Opportunities
- 3.2K π Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random