Re: Documentation blues

[prev] [thread] [next] [Date index for 2005/06/21]

From: Jacinta Richardson
Subject: Re: Documentation blues
Date: 12:37 on 21 Jun 2005
G'day everyone,

A little more on this seems to have come to light.

If I remove other various tests I was performing in the same file, then

	print "essential columns: ",join (" ", Staff::Details->_essential),"\n";
	my $staff = Staff::Details->search_by_num_projects()->first();
	$staff->firstname();

	print Dumper \$staff;

yields:

	essential columns: staffid
	$VAR1 = \bless( {
	                   'state' => 'Vic',
	                   'lastname' => 'Sprat',
	                   'city' => 'Melbourne',
	                   'numprojects' => '2',
	                   'staffid' => '12345',
	                   'position' => 'Devel',
	                   'address' => '2 Pine Rd',
	                   'firstname' => 'Jack',
	                   'wage' => '80'
	                 }, 'Staff::Details' );

which is great!  Yet if I do anything else such as

	my @all_staff = Staff::Details->retrieve_all;

I'm back to not getting numprojects.  If I perform a search which only includes 
some of the employees before performing this search then I get a mix where some 
objects have the numprojects and others don't.  This is obviously less than ideal.

It's pretty clear that what is happening is that since the objects my search is 
turning up already exist in the global cache of objects they're not being 
created and thus aren't gaining this new column value.

I'll try to create a test case for this and consider how it could be patched.

The previous issue regarding the disparity between the documentation and 
implementation of the Essential columns is still of interest.

All the best,

	Jacinta

        -- 
            ("`-''-/").___..--''"`-._          |  Jacinta Richardson         |
     `6_ 6  )   `-.  (     ).`-.__.`)  |  Perl Training Australia    |
     (_Y_.)'  ._   )  `._ `. ``-..-'   |      +61 3 9354 6001        |
   _..`--'_..-_/  /--'_.' ,'           | contact@xxxxxxxxxxxx.xxx.xx |
  (il),-''  (li),'  ((!.-'             |   www.perltraining.com.au   |


Documentation blues
Jacinta Richardson 12:14 on 21 Jun 2005

Re: Documentation blues
Jacinta Richardson 12:37 on 21 Jun 2005

Re: Documentation blues
Perrin Harkins 13:44 on 21 Jun 2005

Re: Documentation blues
Jacinta Richardson 14:29 on 21 Jun 2005

Re: Documentation blues
Perrin Harkins 17:02 on 21 Jun 2005

Re: Documentation blues
Lonely Rolling Star 00:37 on 04 Jul 2005

Re: Documentation blues
Perrin Harkins 02:00 on 05 Jul 2005

Re: Documentation blues
Cees Hek 17:01 on 21 Jun 2005

Re: Documentation blues
Kingsley Kerce 13:06 on 21 Jun 2005

Generated at 16:37 on 28 Jul 2005 by mariachi v0.52