Re: [RDBO] bug - similar names kill with_objects calls

2007-06-01 Thread Jonathan Vanasco

On Jun 1, 2007, at 9:01 AM, John Siracusa wrote:
> Yeah, I was going to say, RDBO should be able to keep track of what's
> what even when there are identical column names.

It is.. sorry about that.

Perl somehow got hosed on that box.  When I saw a section of the app  
fail, I checked the rose code and pglog -- and it gave every  
indication rose wasn't.  Then other sections started failing with  
random code and modules.  I have no idea WTF happened.



// Jonathan Vanasco

| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -
| SyndiClick.com
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -
|  FindMeOn.com - The cure for Multiple Web Personality Disorder
|  Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -
|  RoadSound.com - Tools For Bands, Stuff For Fans
|  Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object


Re: [RDBO] bug - similar names kill with_objects calls

2007-06-01 Thread John Siracusa
On 5/31/07, Jonathan Vanasco <[EMAIL PROTECTED]> wrote:
> please disregard the last question.
>
> additional troubleshooting showed that , somehow , perl on that dev
> box is completely corrupted.
>
> reinstalling *everything* seems to have fixed it after we tested the
> same app on another server.

Yeah, I was going to say, RDBO should be able to keep track of what's
what even when there are identical column names.

-John

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object


Re: [RDBO] bug - similar names kill with_objects calls

2007-05-31 Thread Jonathan Vanasco
please disregard the last question.

additional troubleshooting showed that , somehow , perl on that dev  
box is completely corrupted.

reinstalling *everything* seems to have fixed it after we tested the  
same app on another server.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object


[RDBO] bug - similar names kill with_objects calls

2007-05-31 Thread Jonathan Vanasco

So I have a table for api accounts

Table "public.api_useraccount"
 Column |Type   
   
|  Modifiers
+- 
+--
 id | integer | not  
null default nextval('api_useraccount_id_seq'::regclass)
 etc

and 3 types of API keys.
since each type of API key is quite different, I have 3 seperate api  
key tables

lets just look at key portions of 2

Table "public.api_key"
   Column   | Type  |   
Modifiers
+--- 
+--
 id | bigint| not null default  
nextval('api_key_id_seq'::regclass)
 api_useraccount_id | integer   | not null
 api_key| character(12) | not null
 key_name   | character varying(32) |

Table "public.api_application_key"
   Column| Type   
|Modifiers
-+--- 
+--
 id  | bigint| not null default  
nextval('api_application_key_id_seq'::regclass)
 api_useraccount_id  | integer   | not null
 api_application_key | character(14) | not null
 application_name| character varying(32) | not null
 application_version | character varying(32) |

the similaritty of column names makes rose unhappy when i do some  
things.

some things like a manager load with_objects...

with_objects=> [
'api_keys',
'api_application_keys',
'api_quicklist_keys',
],

creates this sql

SELECT
  t1.id,
  etc

  t2.api_key,
  t2.api_useraccount_id,
  t2.id,
  t2.key_name,

  t3.api_application_key,
  t3.api_useraccount_id,
  t3.application_name,
  t3.application_version,
  t3.id,

  t4.api_useraccount_id,
  t4.application_name,
  t4.application_version,
  t4.id,
  t4.key__private,
  t4.key__public

FROM
  api_useraccount t1
  LEFT OUTER JOIN api_key t2 ON (t1.id = t2.api_useraccount_id)
  LEFT OUTER JOIN api_application_key t3 ON (t1.id =  
t3.api_useraccount_id)
  LEFT OUTER JOIN api_quicklist_key t4 ON (t1.id =  
t4.api_useraccount_id)
WHERE
  t1.useraccount_id =

Notice the issue ?

on the return, there is a ton of overlap on the column names.
when rose stars trying to build objects, it often sees null values --  
because t2.api_key is populated, but its reading t3.api_key when it  
looks at api_key in the result row.

the only way i can envision a fix is by doing something like this;

SELECT t1.available_api_application_keys AS  
t1_available_api_application_keys

and using a lookup hash to map t1_available_api_application_keys to  
the t1 object and column when creating objects






// Jonathan Vanasco

| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -
| SyndiClick.com
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -
|  FindMeOn.com - The cure for Multiple Web Personality Disorder
|  Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -
|  RoadSound.com - Tools For Bands, Stuff For Fans
|  Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object