takapon
unread,May 14, 2008, 4:20:53 AM5/14/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Piece Framework Users (ja)
内海です。お世話になります。
Piece_ORMでpostgresqlの配列型のカラムを含むテーブルに
アクセスしようとするとエラーとなります。
一度、配列型のカラムを削除してエラーなくアクセスした後、
配列型のカラムを追加すると、エラーなくアクセスできます。
(Piece_ORMのキャッシュフォルダをクリアするとアクセスできなくなります)
長いですが、下記にエラー内容をお知らせします。
配列型のカラム名はaryです。
宜しくお願いします。
環境:
OS:windowsXP
php5.2.2 Apache2.2.4 postgresql-8.3.1
Piece_ORM1.0.0
Piece_Unity1.4.0
----------------エラー内容--------------------------
array(8) {
["code"]=>
int(-1)
["params"]=>
array(0) {
}
["package"]=>
string(9) "Piece_ORM"
["level"]=>
string(9) "exception"
["time"]=>
float(1210751977.18)
["context"]=>
array(4) {
["file"]=>
string(48) "D:\xampp\php\PEAR\Piece\ORM\Metadata\Factory.php"
["line"]=>
int(255)
["function"]=>
string(27) "_createMetadataFromDatabase"
["class"]=>
string(26) "Piece_ORM_Metadata_Factory"
}
["message"]=>
string(55) "Failed to invoke $reverse->tableInfo() for any reasons."
["repackage"]=>
array(6) {
["code"]=>
int(-6)
["message"]=>
string(25) "MDB2 Error: not supported"
["params"]=>
array(2) {
["userinfo"]=>
string(1957) "_mapNativeDatatype: [Error message: unknown
database attribute type: _numeric]
[Last executed query: SELECT a.attname AS name,
t.typname AS type,
CASE a.attlen
WHEN -1 THEN
CASE t.typname
WHEN 'numeric' THEN (a.atttypmod / 65536)
WHEN 'decimal' THEN (a.atttypmod / 65536)
WHEN 'money' THEN (a.atttypmod / 65536)
ELSE CASE a.atttypmod
WHEN -1 THEN NULL
ELSE a.atttypmod - 4
END
END
ELSE a.attlen
END AS length,
CASE t.typname
WHEN 'numeric' THEN (a.atttypmod % 65536) - 4
WHEN 'decimal' THEN (a.atttypmod % 65536) - 4
WHEN 'money' THEN (a.atttypmod % 65536) - 4
ELSE 0
END AS scale,
a.attnotnull,
a.atttypmod,
a.atthasdef,
(SELECT substring(pg_get_expr(d.adbin,
d.adrelid) for 128)
FROM pg_attrdef d
WHERE d.adrelid = a.attrelid
AND d.adnum = a.attnum
AND a.atthasdef
) as default
FROM pg_attribute a,
pg_class c,
pg_type t
WHERE c.relname = 'mt_test'
AND a.atttypid = t.oid
AND c.oid = a.attrelid
AND NOT a.attisdropped
AND a.attnum > 0
AND a.attname = 'ary'
ORDER BY a.attnum]
"
["debuginfo"]=>
string(1957) "_mapNativeDatatype: [Error message: unknown
database attribute type: _numeric]
[Last executed query: SELECT a.attname AS name,
t.typname AS type,
CASE a.attlen
WHEN -1 THEN
CASE t.typname
WHEN 'numeric' THEN (a.atttypmod / 65536)
WHEN 'decimal' THEN (a.atttypmod / 65536)
WHEN 'money' THEN (a.atttypmod / 65536)
ELSE CASE a.atttypmod
WHEN -1 THEN NULL
ELSE a.atttypmod - 4
END
END
ELSE a.attlen
END AS length,
CASE t.typname
WHEN 'numeric' THEN (a.atttypmod % 65536) - 4
WHEN 'decimal' THEN (a.atttypmod % 65536) - 4
WHEN 'money' THEN (a.atttypmod % 65536) - 4
ELSE 0
END AS scale,
a.attnotnull,
a.atttypmod,
a.atthasdef,
(SELECT substring(pg_get_expr(d.adbin,
d.adrelid) for 128)
FROM pg_attrdef d
WHERE d.adrelid = a.attrelid
AND d.adnum = a.attnum
AND a.atthasdef
) as default
FROM pg_attribute a,
pg_class c,
pg_type t
WHERE c.relname = 'mt_test'
AND a.atttypid = t.oid
AND c.oid = a.attrelid
AND NOT a.attisdropped
AND a.attnum > 0
AND a.attname = 'ary'
ORDER BY a.attnum]
"
}
["package"]=>
string(4) "PEAR"
["level"]=>
string(9) "exception"
["time"]=>
float(1210751977.18)
}
}