Mặc định phần list trong module quản lý ở backend query rất là ngu! Kiểu của nó là mỗi query ra thông tin 1 bản ghi, do đó sẽ query nhiều câu
Ngu ở đây là do nó tự động, nó ko biết join cho mình, mình phải tạo ra một method để chủ động query join các bảng cần thiết lấy ra thông tin mong muốn.
Ví dụ: Tạo hàm retrieveBackendNewsList trong NewsTable.php
public function retrieveBackendNewsList() {
$q = Doctrine_Query::create()->from('News n')->leftJoin('n.Author a')
->leftJoin('n.Category c')
->leftJoin('n.Translation t');
return $q;
}
Sau đó thêm vào phần cấu hình module, khai báo method sẽ dùng query lấy thông tin danh sách
list:
table_method: retrieveBackendNewsList
skip to main |
skip to sidebar
Note anything I want
Thursday, July 22, 2010
Tags
.BAT
.htaccess
.NET
500
[Visual] C [++]
absolute
admin
ADODB
advertise
ajax
apache
API
arguments
array
ASP
attrib
auto-post
AutoIT
awk
back
Back-end
background
backup
blogger
bookmark
branch
breadcrumb
buffer
bug
C#
cache
Caesar
CafeF
canvas
CAS
case-when
centos
cgi
CIDR
ckEditor
clean-up
cmd
cms
color
column
command
commit
compile
component
config
connection
cookie
cool
copy db
crawler
credential
CSS
cURL
daemon
datafile
delete
design
df
Diem
disk-space
distinct
DLL
doctrine
documentation
domain
DomDocument
download
editor
encode
encrypt
English
enter
error
excel
exception
extension
facebook
fdisk
filter
find-exec
firefox
fix
fixture
flick
foreign-key
form
function
gdata
Google
groupBy
gzip
haproxy
HashSet
having
helper
history
hook
hosting
HTML
HTML5
httpd
I18N
ifconfig
image
imagick
innerHTML
input
install
ip
Iphone
j2me
Java
Javascript
join
Joomla
jQuery
JSP
keyboard
LAN
learning
LIGHTTPD
Linux
log
log4j
lynx
margin
menu
merge
Midlet
mobile
model
mount
msisdn
MySQL
NetBeans
network
nfs
nodejs
not4you
npm
oauth
Opacity
option
Oracle
order
outlook
pagination
paging
pdf
pear
performance
perl
permission
persist
PHP
php-block
php.ini
ping
plugin
popup
position
procedure
process
progress-bar
Properties
proxy
PSD
PTS
query
radio
radis
random
raw-request
recursive
redis
regex
relocate
Repository
require_once
revert
rms
rotate
route
RSA
rss
rsync
runable
schema.yml
scp
search
select
serial
server
Service Pack 3
session
setFlash
setInterval
sfConfig
sfDoctrineGuard
shell
shop-cart
sign
smiliebox
SMS
soap
SoapClient
socks
solved
split
sql
ssh
SSO
stderr
stdin
stdout
step-by-step
storage
submit
svn
svnadmin
switch
symbian
symfony
table
tablespace
template
thread
thumbnail
timeout
Tree Menu
trunk
unicode
update
upload
utf8
UUID
validator
vba
VBS
vbulletin
VC Corp
version
virtual-host
VirtueMart
Visual Basic
VPN
WAP
web-server
webservice
widget
Windows XP
winscp
Word
wordpress
wsdl
xdebug
xml
yahoo
yaml
youtube
yum
Blog Archive
-
►
2012
(70)
-
►
May
(25)
- java -jar utf8
- Netbeans - Javascript - ignore using Unicode chara...
- PHP Imagick - Watermark images
- GD vs Imagick, what library should I choose to man...
- Install imagick extension for PHP 5.3.8 on Windows...
- Viết thư viện DLL - PHP extension trên Windows
- Javascript - How to check key of object
- Cho xin serial phần mềm archpr 4.53
- html href base tag fix broken link
- choose color text on your site
- web rewrite lose style image
- How to update relationship between product and cat...
- Apache - Rewrite .htaccess with RewriteBase
- PHP - Implement cache interface
- Photoshop - Scale button change width
- javascript - calculate width string
- Word - Delete remove border line
- Photoshop - Change color
- Distance between two guides in Photoshop
- HTML5 - Canvas draw image arguments
- CSS - Style text and icon block
- Cut icon from PSD file
- Cách thức tổ chức phân quyền người dùng
- Fix error ckeditor r is null line 122
- Use Redis to cache product information
-
►
April
(18)
- EmEditor Regex Pattern
- javascript - internet explorer get image width hei...
- Cookies vs LocalStorage
- PHP SoapClient call .NET service error application...
- Làm thế nào để copy dữ liệu một cột từ bảng ở trên...
- gzip string in bash
- wordpress permalinks 404 htaccess AllowOverride
- javascript - are you clear
- MySQL - Should use MEDIUMTEXT
- Flash uploadtify session authenticate
- HTML5 - Canvas rotate shape
- Photoshop - Draw grid
- javascript - get random element in array
- javascript - shuffle array
- MySQL get first and last day of week
- MySQL query get first and last day of month
- MySQL date time unix timestamp
- PHP - Merge associative array with plus operator
-
►
May
(25)
-
▼
2010
(272)
-
▼
July
(34)
- Create new module action for Diem Backend
- Change PHP template for Netbeans IDE
- Build widget for Diem Project
- Permission In Backend Symfony Application
- Symfony sfDoctrinePager
- Generate schema.yml from existed db
- Symfony backend: Set culture for module action
- Symfony backend: Custom query get item list
- Symfony backend: Show relation objects when edit
- sfDoctrinePlugin CSS not found
- Symfony: URL Routing and Object Routing
- Symfony: Thay đổi trang 404 not found
- Symfony: Thay đổi title cho trang
- Symfony: Sử dụng I18N cho các nhãn trong layout và...
- Found other domains hosted on the same web server
- Bookmarked link for Symfony, Doctrine, Diem
- MySQL has gone away Error 2006
- ORM Doctrine
- Hiển thị Chart trong back-end của Diem
- Hiển thị tin bài cũ hơn trong module article, acti...
- Add new module for Diem
- Install plugin for Diem
- Change default session_name of symfony
- Exception report Viettel Privilege
- Symfony - Diem - Admin - Field AutoComplete
- Send Post Request with WFetch 1.4
- Symfony - Diem - Layout and templating
- Doctrine use raw SQL
- Symfony Doctrine find to get Object
- Struts 2 and Hibernate
- Java XML Parser DOM vs SAX
- Download Google Maps for mobile
- Symfony: User Management: sfDoctrineGuard Installa...
- Set default charset for all tables created by doct...
-
▼
July
(34)
Link List
- How to get full filename of the snapshot taken in JSR 234
- Using DmMedia
- Managing Hierarchical Data in MySQL
- JQuery Tabs
- Custom listBy* methods in widget list in Diem
- Diem Widget
- Oracle
- JAVA - Build WebSerivce
- SOAP - Using classmap (PHP)
- VB6 - Hook keyboard and Mouse
- WordPress - Create new widget
- Symfony - Create new plugin
Copyright 2010 Love Codjng . Powered by Blogger
Blogger Templates created by Deluxe Templates Wordpress by thebookish
0 comments:
Post a Comment