You can subscribe to this list here.
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
(57) |
May
(287) |
Jun
(166) |
Jul
(286) |
Aug
(273) |
Sep
(254) |
Oct
(144) |
Nov
|
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Alex B. <en...@tu...> - 2001-08-20 21:13:06
|
hi all, Sync to sourceforge is done, you can update your checkouts :) _alex |
|
From: Alex B. <en...@tu...> - 2001-08-20 19:54:07
|
hmmmm...
how about changing:
<modules>
<content>
<layout>
<name>exmaple_layout</name>
<package>html.layouts</package>
</layout>
<load>
<module>
<id>product_list</id>
<name>ProductLister</name>
<package>user.mod.products</package>
<load_order>1</load_order>
</module>
<module>
<id>product_delete</id>
<name>DeleteProduct</name>
<package>user.mod.products</package>
<load_order>2</load_order>
</module>
</load>
</content>
</modules>
to:
<groups>
<content>
<layout>
<name>exmaple_layout</name>
<package>html.layouts</package>
</layout>
<modules>
<module>
<id>product_list</id>
<name>ProductLister</name>
<package>user.mod.products</package>
<load_order>1</load_order>
</module>
<module>
<id>product_delete</id>
<name>DeleteProduct</name>
<package>user.mod.products</package>
<load_order>2</load_order>
</module>
</modules>
</content>
</groups>
Odysseas and I had discussed a way of "getting around" the "no name" thing
by making an assumption:
if you want an xml2php source xml to have "keyless" arrays, you define an
xml structure as follows:
<things>
<thing>moo</thing>
<thing>moo</thing>
<thing>moo</thing>
</things>
i.e. plural and singlular.
> The xml2php is already working quite nice [for me]. However, there is a
> small problem with pagedef (bcp.xml). Currently modules are defined under
> 'load' as arrays, but unlike all other arrays in bcp.xml and any other
> place, they have no name [key, whatever]. (small example bellow).
>
> $gPageDef = array(
> 'modules' => array(
> 'content' => array(
> 'load' => array(
> array(
> 'id' => 'mooboo',
> 'name' => "OtherWorld",
> 'package' => "hello_world",
> 'load_order' => "3"
> ),
> ),
> ),
> );
>
> The bad news are that in XML we can't define array without name. We can only
> define something like this:
> $gPageDef = array(
> 'modules' => array(
> 'content' => array(
> 'load' => array(
> 'module' => array(
> 'id' => 'mooboo',
> 'name' => "OtherWorld",
> 'package' => "hello_world",
> 'load_order' => "3"
> ),
> ),
> ),
> );
>
> I'm afraid we will have to modify the way Page uses modules (add support for
> module names) if we want to see xml2php working. Any ideas or comments?
>
> Andris Spruds
|
|
From: Alex B. <en...@tu...> - 2001-08-20 19:48:51
|
it is, last I checked. I'll have a look.
_a
> Hi,
> Is bc_edit this supposed to work at this point?
>
> in bc_edit.htc
>
> function evntBlur()
> {
> mXml.nodeValue = Text;
> }
>
> ERROR 'mXml is null or not an object', it appears to be null
>
> This is after pressing DONE after making changes.
>
>
> Bruce
>
>
>
> _______________________________________________
> binarycloud-dev mailing list
> bin...@li...
> http://lists.sourceforge.net/lists/listinfo/binarycloud-dev
>
|
|
From: Alex B. <en...@tu...> - 2001-08-20 19:47:53
|
> I had to do a quick hack to the metabase_mysql driver to support > _ProcessResult properly (added GetColumnNames($result), to driver). > We have to modifiy the other metabase drivers (mSQL,PostgreSQL) too or the > QueryManager (as I did in _GetNumCols). But I don't like abstraction there, > it's cleaner to have a standard metabase installtion that supports the > following functions for fetching column names and count for a executed query > (or something similar): > > MetabaseGetNumCols($database, $result) > MetabaseGetColNames($database, $result) > > This should be no problem. All DBMS as well as PHP support the functionality > to archive this - it just has to be done. However for the moment it works > for OCI and mysql (with the patch). Ok, cool. I think manuel is now subscribed to the list... manuel, what do you think? > Init: > ------- > I had to extent Init to load metabase and QueryManager (hope we did not > redundant work, alex?). For a example how to use the swichtches/options see: > > r2/binarycloud/user/htdocs/query_example.php > > I also prepared Init to use the request class but that's still commented > out. We didn't do redundant work. I was going to add it but didn't - you did :) > Modules: > ---------- > I did a really quick demonstration module for a simple custom query. You can > find that in r2/binarycloud/user/mod/query_example. Very cool. > How to setup??: > ------------------ > Now most important the steps to make the query example working. > > 1: Create a database named "test" (or whatever you like) > 2: Install the schema (it requires the db named test) > r2/binarycloud/user/mod/query_example/schema.xml > or install the sql dumpfile located > r2/binarycloud/user/mod/query_example/schema.xml > > Now you should have a database called "test" a tables called "news". > > 3: Modify r2/binarycloud/user/conf/datasources.php > The first source name is 'query_example'. Change the parameters > to fit your setup. > > 4: run make > 5: call query_example.php in your broswer > 6: hopefully, smile :) Will do... _a |
|
From: Alex B. <en...@tu...> - 2001-08-20 19:46:07
|
I have commited: INSTALL.WIN32 binarycloud/base/core/Request.php binarycloud/base/core/Sess.php binarycloud/base/init/Init.php binarycloud/base/mgr/QueryManager.php binarycloud/ext/metabase/metabase_mysql.php binarycloud/user/conf/datasources.php binarycloud/user/htdocs/bcp.xml binarycloud/user/htdocs/query_example.php binarycloud/user/mod/query_example/QueryExample.php binarycloud/user/mod/query_example/schema.sql binarycloud/user/mod/query_example/schema.xml to core, and will synch as soon as I read the rest of the messages on the list. _a |
|
From: Alex B. <en...@tu...> - 2001-08-20 19:36:36
|
hi Charlie, added this to the WIN32 instructions. _a > I located and eradicated the "make" bug! > register_globals = On; (in php.ini) > > So what have we learned today? > During a Win32 install make sure $BCHOME is set. > Turn "register_globals" and "register_argc_argv" on in php.ini. > And if you don't like seeing the PHP headers during the make add a -q in > proccessprepend.php: > #!c:/php/php.exe -q > > A shout out to Roni for his support. > > Charlie > > > _______________________________________________ > binarycloud-dev mailing list > bin...@li... > http://lists.sourceforge.net/lists/listinfo/binarycloud-dev > |
|
From: Alex B. <en...@tu...> - 2001-08-20 19:33:34
|
>> I don't see why not. I don't _think_ entityManager supprts that currently >> but I have no problem with the idea as long as its implemented properly :) >> > > It does support that; you have to specify the joins in a hierarchical array > structure in the entity definition (that syntax could use some rethinking > before we release as it was imported from an earlier abstraction layer). I can > supply an example entity definition if there is interest. That would be great. >> Actually, along these lines: does anyone have any qualms about making this >> assumption?: >> >> -Entity Field names must correspond exactly to table field names (we >> could get rid of the schema map if we did this) >> > > The schema structure is optional; if it's not present, we use the object > structure, which is single-dimensional, instead. Odysseas or John C. will > probably have better rationale for this than I do, but at least one example of > where the schema mapping comes in useful is in building a generic public data > access structure which could be used to automatically generate, for example, > dtd's for XML access to these objects. Having a degree of independance between > your data access structure's element names and your database field names could > prove useful for cases like this. Agreed. _a |
|
From: Alex B. <en...@tu...> - 2001-08-20 19:32:38
|
can you give me an idea of what kind of hacks besides lob? _a > On Fri, 17 Aug 2001, Alex Black wrote: > >>> >>> I have to do minor changes to metabase drivers (GetColumnNames(), oci >>> already supports this). QM:_ProccessResult does need this. The alternative >>> is to implement the database specific functions that are required directly >>> into QM, but I don't like this. >>> >>> Alex, anything specific I have to take care of when r2ifying the code? >> >> ------- >> >> Re changes to the metabase drivers: >> >> -John D, JPC? Did you have to do this? >> > > Yes, we did have to hack metabase a bit. If you need the hacked versions, you > know where you can get them (they also have LOB support which wasn't > implemented quite nicely enough to be contributed back to Manuel; cleaning up > this would also be a nice 2-3 hour project if someone is interested :)), but > it'd be much preferable if we could run off the distributed metabase. |
|
From: Alex B. <en...@tu...> - 2001-08-20 19:31:26
|
that is correct, only Init.php should be there. > Roni, after the 'make' which files should be in: > $BCHOME/build/en/binarycloud/int/ > > When I make only Init.php is in the directory. Should prepend.php be there? > > Charlie > > _______________________________________________ > binarycloud-dev mailing list > bin...@li... > http://lists.sourceforge.net/lists/listinfo/binarycloud-dev > |
|
From: Alex B. <en...@tu...> - 2001-08-20 19:31:01
|
well, he did - but those constants are supposed to be replaced during the make process with PWD and PWD/make/lang_code so I'm confused :) _a > Could it be that odysseas made a modification to > $BCHOME/base/init/prepend.php and checked it into CVS propagating his > $BCHOME path in prepend.php? > > Charlie > > -----Original Message----- > Subject: RE: [binarycloud-dev] entity definition format > > >> It's correct. The whole package installs correct except >> binarycloud/base/init. That directory is the only one with an error. >> >> Charlie >> >> >>> Roni, turning register_argc_argv on doesn't do the trick. Here's the >> error >>> I'm getting during make: >>> >>> FIFI:/c/adg/binarycloud/r2/binarycloud/base/init$make >>> X-Powered-By: PHP/4.0.6 >>> Content-type: text/html >>> >>> >>> Could not open file for writing : >>> FIFI:/c/adg/binarycloud/r2/binarycloud/base/init$ >>> >>> Take a look at the files in binarycloud/base/init, specifically >>> prepend.php. > actually this is the first time this problem apper in the list.... > but what my concern is, the processprepend.php will make some read/write > process in $BCHOM/build/en/htdocs/prepend.php but not > $BCHOME/base/init/prepend.php > this is quite strange.............. > > could you plz leave your platform details for me, see if I can fix it or > not... > or you can fix it by your own plz tell me the tricks......... :) > > roni >>> Are they correct? >>> >>> Charlie >>> >> Charlie, >> >> how about if you use windows style path in $BCHOME?? >> like c:/path/to/binarycloud >> see what is happen... >> >> roni >> > > > _________________________________________________________________ > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp > > > _______________________________________________ > binarycloud-dev mailing list > bin...@li... > http://lists.sourceforge.net/lists/listinfo/binarycloud-dev > > > _______________________________________________ > binarycloud-dev mailing list > bin...@li... > http://lists.sourceforge.net/lists/listinfo/binarycloud-dev > |
|
From: Alex B. <en...@tu...> - 2001-08-20 19:28:46
|
I've added this and commited... I'm working through the (avalance!) of messages from the weekend and will do a sync when I get to the last one :) _a >> >> let me know if that works, because it would probably work on linux, as >> well. >> it seems like maintaining windows compatibility is a real possibility, so >> I'd like to try and 'make the make process' as "cross platform" as >> possible. >> >> :) >> >> _a >> > alex, > > it is possible to put #!/bin/sh at the header of installcode.sh.... > I think it is not a problem of linux, and makes life easier in Win32.... > > roni > > _________________________________________________________________ > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp > > > _______________________________________________ > binarycloud-dev mailing list > bin...@li... > http://lists.sourceforge.net/lists/listinfo/binarycloud-dev > |
|
From: John P. C. <jp...@jp...> - 2001-08-19 21:46:06
|
On Sun, Aug 19, 2001 at 01:49:25PM -0400, John Donagher wrote: > On Sun, 19 Aug 2001, Andreas Aderhold wrote: > > > OK, will that work for the 4NF ? > > i.e. "get all interest names for user with this id" > > > > user_id > > user_interests -> userinterests > > > > userinterests: > > user_id > > interest_id-> interests > > > > interests: > > interest_id > > interest_desc > > This seems like an example of a multi-lined "owned object". I didn't go back and read the original mail, so I hope this is useful. There would be 3 entities: user, userinterest, interest. The owned object would be "userinterest", with a parententity of user. In the parent entity, you define how a parent relates to it's "owned objects" like this: 'ownedobjects' => array ( 'fkey' => 'PATH1', // from userinterest 'invfkey' => 'PATH2', // from user 'entity' => 'userinterest', // the ownedobject entity 'path' => 'USERINTERESTS', // how to reference from the parent object ) and in the owned object entity: 'parententity' => 'user' Once all the meta data work is done, then all the linking of user and userinterests will be done automatically (thanks to ent2qry). There will also be a ready made multiline UI for choosing interests to associate with this user (assuming the user layout file is correct). More concrete examples can be given as needed. HTH, jpc |
|
From: John D. <jo...@we...> - 2001-08-19 17:50:33
|
On Sun, 19 Aug 2001, Andreas Aderhold wrote: > > OK, will that work for the 4NF ? > > i.e. "get all interest names for user with this id" > > user_id > user_interests -> userinterests > > userinterests: > user_id > interest_id-> interests > > interests: > interest_id > interest_desc > I believe so, although I've never actually done it, so maybe John C. or Odysseas can answer this one. > [entities that span tables/part of tables] > > It does support that; you have to specify the joins in a > > hierarchical array structure in the entity definition (that syntax could > > use some rethinking > > before we release as it was imported from an earlier abstraction > > layer). I can supply an example entity definition if there is interest. > > Oh yes, please. > On its way -- John Donagher Application Engineer, Intacct Corp. Public key available off http://www.keyserver.net Key fingerprint = 4024 DF50 56EE 19A3 258A D628 22DE AD56 EEBE 8DDD |
|
From: Andreas A. <a.a...@th...> - 2001-08-19 17:03:31
|
Hi All, For those who are interested. I just benched the cache examples and the query example of current BC w/wo ZendCache. ------------------------------------------ The query_example ------------------------------------------ To make the thing a bit more interesting. I extended the table to 4 datarows with each different records. Average row size 1,432 Bytes. With cache Try 1: 3.52 req/s Try 2: 3.44 req/s Try 3: 3.56 req/s Try 4: 3.61 req/s Try 5: 3.58 req/s 3.542 requests/second from 5 tries Without cache Try 1: 0.74 req/s Try 2: 0.55 req/s Try 3: 0.54 req/s Try 4: 0.41 req/s Try 5: 0.68 req/s 0.584 requests/second from 5 tries ==> Speedup: 506.51% ------------------------------------------ Page cache example ------------------------------------------ With cache Try 1: 8.97 req/s Try 2: 9.13 req/s Try 3: 9.11 req/s Try 4: 9.09 req/s Try 5: 9.00 req/s 9.06 requests/second from 5 tries Without cache Try 1: 1.17 req/s Try 2: 0.77 req/s Try 3: 1.15 req/s Try 4: 1.55 req/s Try 5: 0.87 req/s 1.102 requests/second from 5 tries ==> Speedup: 722.14% ------------------------------------------ Module cache example ------------------------------------------ With cache Try 1: 4.25 req/s Try 2: 6.97 req/s Try 3: 6.73 req/s Try 4: 6.97 req/s Try 5: 6.82 req/s 6.348 requests/second from 5 tries Without cache Try 1: 1.17 req/s Try 2: 0.69 req/s Try 3: 1.24 req/s Try 4: 1.21 req/s Try 5: 0.69 req/s 1 requests/second from 5 tries ==> Speedup: 534.80% Andi |
|
From: Andreas A. <a.a...@th...> - 2001-08-19 15:31:21
|
Hi Andris,
> $gPageDef = array(
> 'modules' => array(
> 'content' => array(
> 'load' => array(
> 'module' => array(
> 'id' => 'mooboo',
> 'name' => "OtherWorld",
> 'package' => "hello_world",
> 'load_order' => "3"
> ),
> ),
> ),
> );
> I'm afraid we will have to modify the way Page uses modules (add
> support for module names) if we want to see xml2php working. Any ideas or
> comments?
Hmm did you try:
'load' => array(
0 => array(
'id' => 'mooboo',
...
1 => array(
'id' => 'mooboo1',
...
This should work without changing page. But everybody must obey to this rule
and the array keys (1,2..) have to be continiuous.
Maybe there's another option: We could modify page that the array key numer
in laod (as shown above) reflects implicity the load order. so we could save
the 'load_order' directive and the array conforms to the xml standard.
Andi
|
|
From: Andreas A. <a.a...@th...> - 2001-08-19 15:31:16
|
Hi, I think metabase will officially support that soon so we don't need to hack the lib for querymanager. Andi -----Original Message----- From: Manuel Lemos [mailto:ml...@ac...] Sent: Sonntag, 19. August 2001 00:25 To: Askama Subject: Re: [metabase-dev] MetabaseFieldName() & MetabaseNumberOfFields() Hello Askama, On 18-Aug-01 17:36:05, you wrote: >I was wondering why these functions weren't implemented, since it's so simple >to do in all of the APIs? Personally I don't see the need for them for database applications in production environments. In such applications you always know what fields you have selected unless you used *. There isn't much reason to use * unless you want to select many columns and you don't want to type their names because you feel lazy, or have the impression that it will slow down your query parsing. Anyway, if you got up to that point, maybe it is time to rethink you database schema, naming conventions or queries. But, ok, I may not ever had the need for that but I can understand the need that others may have had. >I could send the functions over so they can be implemented, if necessary... Sure, send them over and I will intergrate them consistently. Regards, Manuel Lemos |
|
From: Andreas A. <a.a...@th...> - 2001-08-19 15:31:10
|
Hi, > > > Another question. Can a entity span say parts of one or more tables? > > > Something similar like a view in SQL? > > "Sort of" > > you can embed entity references (called pointers) in entity definitions. > > > > so you can say: > > > > user_id > > user_name > > user_password > > address_id -> address > > > > i.e. "get the address entity with this id" > Yep. OK, will that work for the 4NF ? i.e. "get all interest names for user with this id" user_id user_interests -> userinterests userinterests: user_id interest_id-> interests interests: interest_id interest_desc [entities that span tables/part of tables] > It does support that; you have to specify the joins in a > hierarchical array structure in the entity definition (that syntax could > use some rethinking > before we release as it was imported from an earlier abstraction > layer). I can supply an example entity definition if there is interest. Oh yes, please. Andi |
|
From: Andris S. <li...@ap...> - 2001-08-19 13:51:42
|
The xml2php is already working quite nice [for me]. However, there is a
small problem with pagedef (bcp.xml). Currently modules are defined under
'load' as arrays, but unlike all other arrays in bcp.xml and any other
place, they have no name [key, whatever]. (small example bellow).
$gPageDef = array(
'modules' => array(
'content' => array(
'load' => array(
array(
'id' => 'mooboo',
'name' => "OtherWorld",
'package' => "hello_world",
'load_order' => "3"
),
),
),
);
The bad news are that in XML we can't define array without name. We can only
define something like this:
$gPageDef = array(
'modules' => array(
'content' => array(
'load' => array(
'module' => array(
'id' => 'mooboo',
'name' => "OtherWorld",
'package' => "hello_world",
'load_order' => "3"
),
),
),
);
I'm afraid we will have to modify the way Page uses modules (add support for
module names) if we want to see xml2php working. Any ideas or comments?
Andris Spruds
|
|
From: Bruce D. <br...@yo...> - 2001-08-19 01:32:31
|
Hi,
Is bc_edit this supposed to work at this point?
in bc_edit.htc
function evntBlur()
{
mXml.nodeValue = Text;
}
ERROR 'mXml is null or not an object', it appears to be null
This is after pressing DONE after making changes.
Bruce
|
|
From: Andreas A. <a.a...@th...> - 2001-08-18 13:06:51
|
Hi All,
Here we go. I checked in a lifted and working version of QueryManager to
sourceforge today. Mostly cosmetic fixes, intregration with $Debug,
user.conf.datasources and PHPDoc comments. I Also added a additional check
for transactions (MetabaseSupport) and made the metabase hack in
_ProcessResult more flexible.
Metabase:
------------
I had to do a quick hack to the metabase_mysql driver to support
_ProcessResult properly (added GetColumnNames($result), to driver).
We have to modifiy the other metabase drivers (mSQL,PostgreSQL) too or the
QueryManager (as I did in _GetNumCols). But I don't like abstraction there,
it's cleaner to have a standard metabase installtion that supports the
following functions for fetching column names and count for a executed query
(or something similar):
MetabaseGetNumCols($database, $result)
MetabaseGetColNames($database, $result)
This should be no problem. All DBMS as well as PHP support the functionality
to archive this - it just has to be done. However for the moment it works
for OCI and mysql (with the patch).
Init:
-------
I had to extent Init to load metabase and QueryManager (hope we did not
redundant work, alex?). For a example how to use the swichtches/options see:
r2/binarycloud/user/htdocs/query_example.php
I also prepared Init to use the request class but that's still commented
out.
Modules:
----------
I did a really quick demonstration module for a simple custom query. You can
find that in r2/binarycloud/user/mod/query_example.
How to setup??:
------------------
Now most important the steps to make the query example working.
1: Create a database named "test" (or whatever you like)
2: Install the schema (it requires the db named test)
r2/binarycloud/user/mod/query_example/schema.xml
or install the sql dumpfile located
r2/binarycloud/user/mod/query_example/schema.xml
Now you should have a database called "test" a tables called "news".
3: Modify r2/binarycloud/user/conf/datasources.php
The first source name is 'query_example'. Change the parameters
to fit your setup.
4: run make
5: call query_example.php in your broswer
6: hopefully, smile
Andi
|
|
From: Andreas A. <a.a...@th...> - 2001-08-18 10:41:59
|
Hi Alex,
> I'll add a 'database' flag to the init array, and a method to
> init to import QueryManager.
If you did not already do this. Just wait a bit I've added this already just
bevore starting to lift the qm code ":)
<page>
<init>
<database>true</database>
</init>
<!-- extra
<source>hook</source> // hook in datasources
<mcrpyt>true</mrcypt> // import metabase mcrypt stuff
<manage>false</manage> // import metabase manager classes
</database>
</page>
> > So QueryManager will become a global like $Lang and not a
> > aggregated-as-needed class.
> Yes... though I am not married to that at the moment, I think
> it's probably best.
I also think thats best for now. Querymanager does have the capability to
load stored queries so there is no real need to have more than one instance
of it loaded, I guess. So you define, e.g. in page or entity manager, which
queries you need for this pagerender/operation/ety e.g. in page:
<database>
<queries>
<name_of_query>path.to.query</name_of_query)
</queries>
</database>
or something like that.
[metabase]
> I've cc'd manuel on this, see what he says :)
Cool.
Andi
|
|
From: Charlie K. <Ch...@Al...> - 2001-08-18 10:01:14
|
I located and eradicated the "make" bug! register_globals = On; (in php.ini) So what have we learned today? During a Win32 install make sure $BCHOME is set. Turn "register_globals" and "register_argc_argv" on in php.ini. And if you don't like seeing the PHP headers during the make add a -q in proccessprepend.php: #!c:/php/php.exe -q A shout out to Roni for his support. Charlie |
|
From: John P. C. <jp...@jp...> - 2001-08-18 09:44:44
|
> Actually, along these lines: does anyone have any qualms about making this > assumption?: > > -Entity Field names must correspond exactly to table field names (we > could get rid of the schema map if we did this) The only problem with this is that the schema fields are the "exposed" fields. A name like userreckey is a reasonable db field name, but isn't a great exposed field name. Also I may have two fields that map to a single db field. I may have, for example, ZIPCODE and ZIPCODE_EXTENDED that end up being concatenated and stored in the db. Or in the case I gave earlier with entities mapping to multiple records in the same table. I may have USERPREF1 and USERPREF2 that get translated to two records in the preference table by ModuleSetupManager. There's more, but I think that gets the point across. jpc |
|
From: John P. C. <jp...@jp...> - 2001-08-18 09:44:43
|
> Another question. Can a entity span say parts of one or more tables? Yes, it can span 0 or more tables. They have many uses. Some are by design and others were just discovered. > Something similar like a view in SQL? Yes. > In the example the complete db entitys are mapped in the definition. And so > querys are genearated for all fields. But that might me overhead. So I would > like to define a entity that spans parts of tables. Your queries should be generated only for those fields in your 'object' section of the entity and in the dbschema.inc file. > E.g. If I have a enty defined called "Subscriptions" that span the > tables.fields: > > user.userId > user.login > smssubscriptions.userId > smssubscritpions.serviceId > emailsubscriptions.userId > emailsubscriptions.serviceId > > but the tbl user has more fields I do not need to query for this entity. But > for this one it's just fine. This is fine. I use the entities for single tables, combinations of tables (e.g. contact with associated mailaddress), and multiple records of the same table. The latter can be done, for example, in the case of preferences. Each "field" in the entity may map to an entire record in a preference table. The possibilities aren't endless, but sometimes it seems that way. :-) jpc |
|
From: John D. <jo...@we...> - 2001-08-18 05:50:10
|
On Fri, 17 Aug 2001, Alex Black wrote: > >> I can see use in having separate "settings" for the database and the app. > > Jepp. I think this is neccessary. > > > > Another question. Can a entity span say parts of one or more tables? > > Something similar like a view in SQL? > > "Sort of" > > you can embed entity references (called pointers) in entity definitions. > > so you can say: > > user_id > user_name > user_password > address_id -> address > > i.e. "get the address entity with this id" > Yep. > > In the example the complete db entitys are mapped in the definition. And so > > querys are genearated for all fields. But that might me overhead. So I would > > like to define a entity that spans parts of tables. > > > > E.g. If I have a enty defined called "Subscriptions" that span the > > tables.fields: > > > > user.userId > > user.login > > smssubscriptions.userId > > smssubscritpions.serviceId > > emailsubscriptions.userId > > emailsubscriptions.serviceId > > > > but the tbl user has more fields I do not need to query for this entity. But > > for this one it's just fine. > > I don't see why not. I don't _think_ entityManager supprts that currently > but I have no problem with the idea as long as its implemented properly :) > It does support that; you have to specify the joins in a hierarchical array structure in the entity definition (that syntax could use some rethinking before we release as it was imported from an earlier abstraction layer). I can supply an example entity definition if there is interest. > ------------ > > Actually, along these lines: does anyone have any qualms about making this > assumption?: > > -Entity Field names must correspond exactly to table field names (we > could get rid of the schema map if we did this) > The schema structure is optional; if it's not present, we use the object structure, which is single-dimensional, instead. Odysseas or John C. will probably have better rationale for this than I do, but at least one example of where the schema mapping comes in useful is in building a generic public data access structure which could be used to automatically generate, for example, dtd's for XML access to these objects. Having a degree of independance between your data access structure's element names and your database field names could prove useful for cases like this. HTH -- John Donagher Application Engineer, Intacct Corp. Public key available off http://www.keyserver.net Key fingerprint = 4024 DF50 56EE 19A3 258A D628 22DE AD56 EEBE 8DDD |