I'm wondering if it's still ok to have duplicateted code
in .tcl files and .xql files. What is the current policy? Should the queries be put in the .xql files or is the swing back to let them show up in .tcl files?
I wonder because I found this in ecommerce
checkout-2.tcl
[db_0or1row get_order_id_and_order_owner "
select order_id, user_id as order_owner
from ec_orders
where user_session_id = :user_session_id
and order_state='in_basket' "]
<fullquery name="get_order_id_and_order_owner">
<querytext>
select order_id,
user_id as order_owner
from ec_orders
where user_session_id=:user_session_id
and order_state='in_basket'
</querytext>
</fullquery>
but it's getting worse the same code can be found also in another .xql file
<fullquery name="get_order_id_and_order_owner">
<querytext>
select order_id, shipping_address as address_id, user_id as order_owner
from ec_orders
where user_session_id=:user_session_id
and order_state='in_basket'
</querytext>
</fullquery>
but this time the same query name is used but the query is
different.
For me it seems either
- ecommerce is stuck (means it's not maintained any longer)
- this are left overs and can be graded as bug?
Does anyone can explain that to me?
Regards
Friedrich