Comments (7)
quick filter is also not working
from atk4-addons.
Recursive links never have worked well like that.
You can try some workarounds. For example, use "fake" model, like Model_Region_Parent extends Model_Region and hasOne('Region_Parent','region_id') or something like that.
BTW:
- In model instead of $entity_code use $table because entity_code is obsolete.
- Why you reported this in atk4-addons section? CRUD is in atk4 main branch I guess. Or you're talking about some specific CRUD implementation from atk4-addons?
from atk4-addons.
Here is how you define parent as per DarkSides's comment:
class Model_Region_Parent extends Model_Region {
public $alias='region_parent';
}
from atk4-addons.
attempt to add support for this resulted in few big problems with models, so above fix should address the problem.
from atk4-addons.
Hmm... didn't know that. Will have to try at some point.
BTW Romans, why you're not visible in IRC for last I guess 2 weeks? :)
from atk4-addons.
the above code do not work also:
sql looks like this: select SQL_CALC_FOUND_ROWS name
,(select name
from region
where region
.region_id
= region
.id
) region
,id
,region_id
from region
order by (select name
from region
where region
.region_id
= region
.id
) limit 0, 25 []
my code:
class Model_Region extends Model_Table {
public $table='region';
function init(){
parent::init();
$this->addField('name')->mandatory('true');
$this->hasOne('Region_Parent','region_id');
}
}
class Model_Region_Parent extends Model_Region {
public $alias='region_parent';
}
class page_region extends Page {
function init(){
parent::init();
$crud=$this->add('CRUD');
$model = $crud->setModel('Model_Region');
$model->debug();
if($crud->grid){
$crud->grid->addPaginator();
$crud->grid->getColumn('name')->makeSortable();
$crud->grid->getColumn('region')->makeSortable();
$crud->grid->addQuickSearch(array('region','name'));
}
}
}
from atk4-addons.
Reopened in #33
from atk4-addons.
Related Issues (20)
- suggestion: add Comment class - allowing users to post comments.
- filestore relies on Volume to be with ID=1 HOT 1
- Drilldown field don't save values on POST HOT 1
- suggestion: improve Doc_HowTo to allow to provide templates. As a result it should allow you to locally create a example and then upload it and import on other system
- when image is being deleted, it leaves record in filestore_image table
- Comment_cnt instead of comment_cnt HOT 1
- ATK4Addons.php - what's this? HOT 2
- Filestore: mime_content_type is deprecated HOT 1
- translation: Controller_Basic fixes
- create some sort of class for managing meta keywords on pages. Something like - $api->add('SEO') and it would come a model and some lightweight admin panel.
- ModelGenerator does not work HOT 9
- ref 31 is not solved still: reopen HOT 1
- AgileToolkit OAuth add-on error 500 at facebook's mobile site HOT 2
- Warning! Potential security vulnerability and data loss. HOT 1
- ModelGenerator.php error HOT 1
- ability to customize filename in filestore HOT 1
- autocomplete not working HOT 3
- highChard doesn't work
- highChard doesn't work HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from atk4-addons.