Is there a specific way to use sqlite3 in symfony without using doctrine?
I just want to do basic operations. And tried including the classes in the directory structure but it is not able to find SQLite3 class.
Any suggestions? I am very tight on time constraint.
Doctrine allow to use sqlite if you define path in doctrine dbal in config.
How to use sqlite database on symfony2 project?
but Doctrine is not integral part of Symfony, so you can drop Doctrine from your project and use sqlite like in pure Php.
You can use exaples form docs:
http://php.net/manual/en/book.sqlite3.php
proposed by Jason Roman in comment. It is simple, but I suggest to create your own service for operation on sqlite or simply use PDO.
http://php.net/manual/en/ref.pdo-sqlite.php
Related
I know this is a duplicate question.
But even i couldn't find any tool to create JPA entity file from database source.
I used eclipse to do this. I only got DTO kind of classes with getters & setters.
Can anyone suggest some tools that create DAO files too.
TIA
You can use Telosys Tools,
an Eclipse plugin working from an existing database with customizable Velocity templates
See: https://sites.google.com/site/telosystools/
Eclipse Marketplace : http://marketplace.eclipse.org/content/telosys-tools
For JPA generation, use the JPA set of templates available on GitHub : https://github.com/telosys-tools
you can use netbeans instead of eclipse. After you create own project, you can select "JPA controller classes from entity classes" in netbeans menu. For example http://ensode.net/roller/dheffelfinger/entry/automated_dao_generation_from_jpa
Minuteproject is a generator tool and can generate JPA2 artifacts from Database.
You can instruct the generator to apply convention for your java code that do not follow your DB convention, but the mapping will be correct. (Example strip DB name prefix; table starting with ADMIN_ such as ADMIN_ENVIRONMENT are Environment (w/out Admin) as java class) For the moment there 20+ conventions that help you reshape your model to be less DB look-and-feel by more Java-OO-friendly.
If you want DAO minuteproject has a track BSLA that generate spring-integrated DAO
I have an application and I want to use a table of Informix in my cakephp application. Is it possible?
I just want the users table of informix, the others tables i'll use mysql. Is it possible?
Thanks.
It can be done but it needs information about how you can access the data. Is it standardised like REST/SOAP or something? Or do you need hard database access?
In general in CakePHP you build a custom datasource for it: http://book.cakephp.org/2.0/en/models/datasources.html or you can work with behaviours which you attach to models.
There are some examples of this approach like this for REST:
http://www.neilcrookes.com/2010/06/01/rest-datasource-plugin-for-cakephp/
In doctrine1 it was possible to generate-models-db. How to do that in doctrine2 from cli?
I end up implementing new command https://github.com/umpirsky/doctrine2/blob/master/lib/Doctrine/ORM/Tools/Console/Command/GenerateEntitiesDbCommand.php :)
Later, I realized you can
php doctrine orm:convert-mapping --from-database yml /path/to/mapping-path-converted-to-yml
I’m looking for a Perl ORM library that has support for reverse engineering of the database schema. All I’ve found so far is
http://perlorm.sourceforge.net/
and it appears to have no reverse engineering support.
There is a list of recommended ORM modules at the P5P wiki.
Rose::DB::Object and DBIx::Class can generate classes for you from an existing database schema, and can also write them out to a set of Perl module files.
Rose::DB::Object::Loader
DBIx::Class::Schema::Loader
DBIx::Class has DBIx::Class::Schema::Loader which generates classes for you from an existing datbase and can also write them out to files. It it limited to loading a single schema though.
There are three commonly used ORMs in Perl, Class:DBI, DBIx::Class and Rose::DB::Object. According to this page at PerlMonks, they can all load the metadata from the database, but it doesn't say how.
I'm working on project and need to implement custom database driver, but can't find any guidelines which interfaces i should to implement.
Is there any resourses available that could help writing custom driver rather thank just diving in code and trying to figure out how current drivers are implemented?
EDIT
By saying "driver" i mean support for example NoSQL dabase using standart Laravel's methods ( Eloquent model and Query builder ), for example:
User::take(10)->get();
For Mysql Laravel uses eloquent
laravel - eloquent
For NoSql like MongoDB, you can use laravel-mongodb
jenssegers - laravel-mongodb
It's even support Hybrid relations between MySql and MongoDB
I have worked on MongoDB (a NoSQL database) in one of my project, where I have to use a jenssengers package https://github.com/jenssegers/laravel-mongodb to use the functionalities. I was not able to use Eloquent in that.
Laravel - eloquent/ jenssegers - Laravel-MongoDB can manage hybrid relations as well.