- Backer | 218
In my application I want to work with database structure (foreign keys etc.). Is there any way, how can I get info about database structure from Nette\Connection instance which i have injected into my Presenter?
Is the right way creating of Nette\Database\DiscoveredReflection on my own? Or is there any way to inject IReflection into my Presenter?
- Member | 2118
In Nette 2.0 there is
method but it's missing in 2.1. The main reason is that Connection never used
reflection directly so it doesn't need reflection.
In my opinion creating your own IReflection service is correct. Keep in mind though that you probably should not use database reflection in presenter directly.
EDIT: @Majkl578: That's 2.0 only and also it's getDatabaseReflection not just getReflection.
Last edited by enumag (2013-04-04 14:37)