Welcome Guest, Not a member yet? Register   Sign In
Gas ORM
#51

[eluser]toopay[/eluser]
I forgot to ask this at the first place, what error message you receive? any PHP warning/error occurs?

[quote author="Khrome83" date="1331406401"]Is there a character limit for table or model names ir foreign keys?[/quote]
There is no character limit.

The caching mechanism, within this ORM, is only to cache recorder(contain Query Builder params), and its result. It will serve same recorder request(which validated by it's hash signature), until some write operation that touch those tables occurs(either save or delete).

If you have other same type relationship working, i will suspect that theres something need to be correctly set up in your relationship property.
#52

[eluser]DerLola[/eluser]
I checked out your ORM today after trying DM and PHP AR and I must say that I love it. In my tests it was about 4 times faster than DM which is great. One feature I'm missing is a to_regular_object() method so I can use it directly in my templates. I'm considering writing an extension myself. Also, when will you release the 2.0 version? The namespacing feature would come in handy Smile
#53

[eluser]toopay[/eluser]
DerLola, the v2.0 is ready. Is just that the documentation needs some work, to cover this version. Hope could manage it, this week.
#54

[eluser]DerLola[/eluser]
That would be awesome. I just checked the 2.0 source on Github and it looks really nice and well structured. So maybe just a "what's changed since 1.6" readme will do.
#55

[eluser]toopay[/eluser]
@all,

Just let you all know, v 2.0 was released. Please put your question, issue or anything related with those new version, in this thread.
#56

[eluser]fountainhead[/eluser]
Hi,

I was using v1.4.3 and just saw that v2.1 of Gas ORM has released.
From the documentation it looks like everything has changed.

For ex. I earlier had

class Property extends Gas {
public $table = 'default_str_properties';
public $primary_key = 'id';

}

Now I need to do something completely different?

<?php namespace Model;

use \Gas\Core;
use \Gas\ORM;

class Property extends ORM {

function _init()
{
// Relationship definition

// Field definition
}

}

Is that correct? Do I need to rewrite my entire codebase again! Sad
#57

[eluser]toopay[/eluser]
[quote author="fountainhead" date="1333300821"]
I was using v1.4.3 and just saw that v2.1 of Gas ORM has released.
From the documentation it looks like everything has changed.
...
Is that correct? Do I need to rewrite my entire codebase again! Sad
[/quote]
Version changed from 1.x.x to 2.x.x means there is major changes. However, the API was not too much changed.

Yes, if you want to upgrade your Gas ORM then you will need to rewrite some part of your application to reflect the change. Consider whether you really need an upgrade or not. Version 1.4.X is stable enough, so unless you have some issue on it, and your application did not need key features of version 2.xx, just use the old version Smile
#58

[eluser]fountainhead[/eluser]
Thanks Toopay.

One question, I have a table call "properties" that is linked to "states" every property belongs to a state.

$properties->with('states')->all(); //Works just fine

I want to do this filtering.

$properties->with('states')->find_where_states_state_name('AZ') // Here state_name is a column in the states table

Is there a way I can do that via chaining? I am new to Gas ORM and tried lots of combinations I know of Sad

Please advise.
#59

[eluser]toopay[/eluser]
@fountainhead, if you eager load some related entity, you can't adding WHERE clause. Every related entity records is bound to parent entity by some unique identifier (PK and FK).

This applied both in v1.xx and v.2.xx, but version 2.x provide several other clauses (select, order_by and limit).

If you need some customized query, use CI query builder inside your model.
#60

[eluser]werchter[/eluser]
Is it correct that in version 2.xx there is no 'find_where' anymore?
If true, that's really a dealbreaker for me! I really liked the fact I could use ActiveRecord conditions to query GAS models in version 1.xx....


<b>Update:</b>
Nevermind, I see I can still use :-)

Code:
->where(array( ... )).




Theme © iAndrew 2016 - Forum software by © MyBB