r9923 - in apps/modules/trunk/test: . code/Organisation code/Person tests
[email protected] Fri, 18 Sep 2009 13:58:28 +0200 (CEST)
| Newsgroups | gmane.comp.java.helma.cvs |
|---|---|
| Message-ID | <20090918115828.642CC3D0E3@mia> |
Author: hannes Date: 2009-09-18 13:58:28 +0200 (Fri, 18 Sep 2009) New Revision: 9923 Added: apps/modules/trunk/test/tests/HopObjectGeneric.js Modified: apps/modules/trunk/test/code/Organisation/type.properties apps/modules/trunk/test/code/Person/type.properties apps/modules/trunk/test/db-mysql.sql Log: Add test for generic collections Details at http://dev.helma.org/trac/helma/changeset/9923 Modified: apps/modules/trunk/test/code/Organisation/type.properties =================================================================== --- apps/modules/trunk/test/code/Organisation/type.properties 2009-09-18 08:05:04 UTC (rev 9922) +++ apps/modules/trunk/test/code/Organisation/type.properties 2009-09-18 11:58:28 UTC (rev 9923) @@ -19,6 +19,19 @@ range.offset = 100 range.maxsize = 100 +generic = collection(Person) +generic.local.1 = $prototype +generic.foreign.1 = person_generic_prototype +generic.local.2 = $id +generic.foreign.2 = person_generic_id + +groupedGeneric = collection(Person) +groupedGeneric.local.1 = $prototype +groupedGeneric.foreign.1 = person_generic_prototype +groupedGeneric.local.2 = $id +groupedGeneric.foreign.2 = person_generic_id +groupredGeneric.group = person_name + name = org_name country = org_country Modified: apps/modules/trunk/test/code/Person/type.properties =================================================================== --- apps/modules/trunk/test/code/Person/type.properties 2009-09-18 08:05:04 UTC (rev 9922) +++ apps/modules/trunk/test/code/Person/type.properties 2009-09-18 11:58:28 UTC (rev 9923) @@ -12,3 +12,6 @@ organisation = object(Organisation) organisation.local = person_org_id organisation.foreign = org_id + +genericPrototype = person_generic_prototype +genericId = person_generic_id \ No newline at end of file Modified: apps/modules/trunk/test/db-mysql.sql =================================================================== --- apps/modules/trunk/test/db-mysql.sql 2009-09-18 08:05:04 UTC (rev 9922) +++ apps/modules/trunk/test/db-mysql.sql 2009-09-18 11:58:28 UTC (rev 9923) @@ -1,15 +1,20 @@ -CREATE DATABASE helmaTest; +CREATE DATABASE IF NOT EXISTS helmaTest; USE helmaTest; GRANT ALL ON helmaTest.* TO helma@localhost IDENTIFIED BY 'secret'; +DROP TABLE IF EXISTS tb_person; +DROP TABLE IF EXISTS tb_organisation; + CREATE TABLE tb_person ( person_id MEDIUMINT(10) NOT NULL, person_name TINYTEXT, person_height TINYINT unsigned, person_dateofbirth DATETIME, person_org_id MEDIUMINT(10) unsigned, + person_generic_prototype VARCHAR(30), + person_generic_id MEDIUMINT(10) unsigned, PRIMARY KEY (person_id) ); Added: apps/modules/trunk/test/tests/HopObjectGeneric.js