Easy improvement at Save() method

42 views
Skip to first unread message

Loksly

unread,
Dec 1, 2011, 8:04:15 AM12/1/11
to Php Object Generator
Hello everybody,

It's interesting to consider to change the Save() method at template.
Profiling my projects I've detected that when inserting new objects to
databases it always makes useless querys like

"select `datatableid` from `datatable` where `datatableid`='' LIMIT
1"

although its a fast query is useless and can be prevented with a
simple code like:

------------------
function Save()
{
$connection = Database::Connect();

$rows = 0;
if ($this->datatableId!=''){
$this->pog_query = "select `datatableid` from `datatable` where
`datatableid`='".$this->datatableId."' LIMIT 1";
$rows = Database::Query($this->pog_query, $connection);
}//below is the same code as generated by pog.
if ($rows > 0)
{
------------------

Another issue:

Is there anyway I can contribute?
I've reported a bug: https://bugs.launchpad.net/pog/+bug/811012
with no reflection at production code.

May I get any kind of access to svn (and commit changes in a beta
branch or whatever) so I can colaborate in a more effective way?
I know POG is stable as it is now but I guess new improvements can be
made.

Joel

unread,
Dec 1, 2011, 10:45:37 AM12/1/11
to Php Object Generator
That's a great suggestion!

Yes, it'd be great if you could contribute more to the project. I put
the source on github recently. Feel free to contribute there.

https://github.com/joelwan/php-object-generator

Paris Paraskeva

unread,
Dec 1, 2011, 3:40:39 PM12/1/11
to php-object...@googlegroups.com
Nice to see pog on github,

Pog is pretty stable but being on gitub will help push fixes to it a bit easier, have a few to contribute when there is time.


Kindest Regards,

Paris Paraskeva
Managing Director
M.E. & E. United Worx Ltd
33, Apostolou Pavlou Avenue, Office 103, 8046 Paphos, Cyprus
Tel.: +357 26220707, +357 26221313, Mob.: +357 99575501
Fax.: +357 26221002
pa...@unitedworx.com
www.unitedworx.com

The information contained in this email message(and any attachments) is legally privileged and confidential information intended only for the use of the addressee(s) listed on this email. If the reader of this message is not the intended recipient you are hereby notified that any dissemination, distribution or copy of this email is strictly prohibited. If you have received this email in error, please notify us by telephone or email on the contact details shown on the end of this email. Thank you.
> --
> You received this message because you are subscribed to the Google Groups "Php Object Generator" group.
> To post to this group, send email to php-object...@googlegroups.com.
> To unsubscribe from this group, send email to php-object-gener...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/php-object-generator?hl=en.
>

Joel

unread,
Dec 17, 2011, 4:00:09 PM12/17/11
to Php Object Generator
Please note the repo on github now automatically pushes to
http://beta.phpobjectgenerator.com

So, anytime a contribution is made and merged into the trunk, it can
be tested and used on the beta subdomain.

Thanks to Loksly for your recent code patches, they should now be on
beta server.

cheers

On Dec 1, 12:40 pm, Paris Paraskeva <pa...@unitedworx.com> wrote:
> Nice to see pog on github,
>
> Pog is pretty stable but being on gitub will help push fixes to it  a bit easier, have a few to contribute when there is time.
>
> Kindest Regards,
>
> Paris Paraskeva
> Managing Director
> M.E. & E. United Worx Ltd
> 33, Apostolou Pavlou Avenue, Office 103, 8046 Paphos, Cyprus
> Tel.: +357 26220707, +357 26221313, Mob.: +357 99575501
> Fax.: +357 26221002
> pa...@unitedworx.comwww.unitedworx.com
>
> The information contained in this email message(and any attachments) is legally privileged and confidential information intended only for the use of the addressee(s) listed on this email. If the reader of this message is not the intended recipient you are hereby notified that any dissemination, distribution or copy of this email is strictly prohibited. If you have received this email in error, please notify us by telephone or email on the contact details shown on the end of this email. Thank you.
>

Reply all
Reply to author
Forward
0 new messages