Love Fuel?
Donate
About
Forums
Discussions
Login
FuelPHP Forums
Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
WanWizard
a.k.a. WanWizard
Discussions
4
Comments
8242
Activity
Many-to-Many Relation Deleting Procedure
As Philip already wrote, I don't think it's supported at the moment. And I don't think it something "uru" will want to add, it is very complex (which is probably the reason it is not supported), but you might want to ask h…
Comment by
WanWizard
January 2016
permalink
Are everthing correct with those observers?
You define observers to run, so they run. If you want to define observer methods in the model itself, you need to use Observer_Self instead.
Comment by
WanWizard
January 2016
permalink
Validation on contents from php://input
The Input class reads from php://input, there is no need to do this manually. In this case, Input::json() would work fine. Fuel doesn't use PHP's global variables, which is why your example fails, $_POST isn't used by run(). By defa…
Comment by
WanWizard
January 2016
permalink
Many-to-Many Relation Deleting Procedure
What I don't understand: If you delete child records, they will be soft-deleted, correct? So why would the join-table records be gone, as the records they point to still exist? Or is it that the soft-delete operation itself deletes the join-t…
Comment by
WanWizard
January 2016
permalink
get message from validation error
$val = \Validation::forge(); // set some rules if ( ! $val->run()) { var_dump($val->error()); } error() returns an array of Validation_Error objects, see http://docs.fuelphp.com/classes/validation/errors.html#/error_objects
Comment by
WanWizard
January 2016
permalink
Ajax FuelPHP
? Fuel is a backend PHP framework, it's not a frontend framework. If you need a frontend framework, pick one, there are plenty. Fuel doesn't want to restrict frontend designers, Fuel is about choice.
Comment by
WanWizard
January 2016
permalink
Many-to-Many Relation Deleting Procedure
I don't think that is supported, but I'm not an ORM expert, you might want to ping "uru" on IRC.
Comment by
WanWizard
January 2016
permalink
using rest in controller hybrid without theme
If you use a theme in the template controller, the same is true. Don't manually try do some all sorts of stuff, since you disable the processing in the parent controller. Instead, use the before() to assign you theme page template to $this->…
Comment by
WanWizard
January 2016
permalink
using rest in controller hybrid without theme
The Hybrid controller does that automatically. This sounds like you're using an after() method that disables the functionality of the hybrid controller. You should assign the theme template in the before() method to $this->template. You sh…
Comment by
WanWizard
January 2016
permalink
Informix Database
The driver will convert the generic method calls into SQL specific for the platform the driver is for. For example, the methods limit(25) and offset(10) will set the variables limit and offset both to 10. The MySQL driver will convert that to &quo…
Comment by
WanWizard
January 2016
permalink
Many-to-Many Relation Deleting Procedure
A cascade_delete = true will delete the related objects, that is true for all relation types. If in a many_many casade_delete is false, it will only delete the records in the through-table, effectively disconnecting the two related objects. For t…
Comment by
WanWizard
January 2016
permalink
I have an issue with ORM, KIndly Help
You can just remove the entire block between and_open() and and_close(), and the query remains the same. If you look at what the raw query returns, the result is logical. If there is no child matching, the result row contains NULL for all child co…
Comment by
WanWizard
January 2016
permalink
Informix Database
For both. Fuel uses drivers to abstract the DB interaction away from the DB class. Currently, Fuel has drivers for MySQL, MySQLi and PDO (ANSI SQL only). Everything that interacts with the database, including the ORM, uses DB methods, so once the…
Comment by
WanWizard
January 2016
permalink
Informix Database
I feel very sorry for you... ;) Jokes aside, Fuel comes with an ANSI SQL driver, that will not work with Informix because of the different SQL dialect that Informix is using. It is possible to write your own driver (someone recently made one for M…
Comment by
WanWizard
January 2016
permalink
MongoDB migrations
We use migrations for everything the changes between versions, we install stuff, we create files and folders, change rights, etc. Migrations are by no means limited to SQL operations.
Comment by
WanWizard
January 2016
permalink
Two questions about Ormauth
1. No, there isn't. Auth is designed as an authentication framework, not as a user management framework. Accessing other user data than for the current user is considered a function for an admin panel where you administer your users. Since eve…
Comment by
WanWizard
January 2016
permalink
I have an issue with ORM, KIndly Help
You don't need anything. What your primary key is follows from your database design, and the design principles you use. If you use non-contextual PK's, like Fuel's default 'id' which is an auto-increment column, it's v…
Comment by
WanWizard
January 2016
permalink
I have an issue with ORM, KIndly Help
I don't understand your question? Both "parent" and "child" tables in my test have a single primary key, "id", and a has_many relation on "parent_id".
Comment by
WanWizard
January 2016
permalink
I have an issue with ORM, KIndly Help
I can not reproduce your problem. I made a complicated query, and made sure no child matched the where clauses: $query = Model_Parent::query() ->where('column', 'value') ->and_where_open() …
Comment by
WanWizard
January 2016
permalink
I have an issue with ORM, KIndly Help
Via the web, using https://webchat.freenode.net/ Or via an IRC client on your PC. For linux, Pidgin is the most popular. Freenode has a tutorial online: http://www.irchelp.org/irchelp/irctutorial.html The channel name is: #fuelphp
Comment by
WanWizard
January 2016
permalink
I have an issue with ORM, KIndly Help
Ok, I understand. I don't have an immediate answer for you, Steve is the ORM man. You might want to ping him on IRC, he doesn't visit the forum. His nic is uru. I will see if I can find the time this weekend to setup some tests.
Comment by
WanWizard
January 2016
permalink
I have an issue with ORM, KIndly Help
Isn't it more logical to build the query different then? If you want Students, why not query students? $students = Model_Students::query() ->related('institution') ->where('institution.id', '=', $ins…
Comment by
WanWizard
January 2016
permalink
Input:delete doesn't support json for REST Controller?
If you are passing json, you need to use Input::json(), that is unrelated to the HTTP method being used. By default, data is submitted in HTTP in a query string type encoding, e.g. like "first=value&arr[]=foo+bar&arr[]=baz".
Comment by
WanWizard
January 2016
permalink
pass View through ajax
A REST controller doesn't have to return json, it can return HTML as well. It is just the default that is json. Check http://fuelphp.com/docs/general/controllers/rest.html#/config on which formats are supported out of the box, and how you conf…
Comment by
WanWizard
January 2016
permalink
Autoloader issue: File does not contain class error
The autoloader contains a cache of loaded classes. When it's not in the cache, it includes the file it thinks the class is in, and then uses class_exists() to verify if the file included does actually contain the class.
Comment by
WanWizard
January 2016
permalink
More Comments
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
About
Username
WanWizard
Joined
January 2011
Visits
2,371
Last Active
3:25AM
Roles
Administrator