db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Fischer (JIRA)" <j...@apache.org>
Subject [jira] Commented: (TORQUE-147) Database objects should not need to inherit from BaseObject
Date Tue, 05 Oct 2010 06:50:35 GMT

    [ https://issues.apache.org/jira/browse/TORQUE-147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12917888#action_12917888
] 

Thomas Fischer commented on TORQUE-147:
---------------------------------------

I should have been more clear before. The idea was to replace inheritance by implementing
an interface. Intospection should really be the last option if everything else fails (but
it will not be needed here IMO. If it will turns out it is needed, we need to discuss again)

As for the beans, while they rdo what they are supposed to do, it turns out that in a real
project you need to do a lot of convedrsion from Beans to Databse objects and vice versa.
Consider e.g. a classic 3-Tier application: A database layer, a business layer and a presentation
layer. The service layer would use database objects internally but its external interfaces
are beans. This works well as long as a service does not call other services, (which is a
perfect sensible thing to do) because then the caller service must convert ts internal object
to beans, call the other service and convert the beans back to database objects. It can be
done (we have a production project using this technique) but it is a pain.
There might be good reasons for bean objects, but using beans as business objects is not 
a good thing to do in my opinion.


> Database objects should not need to inherit from BaseObject
> -----------------------------------------------------------
>
>                 Key: TORQUE-147
>                 URL: https://issues.apache.org/jira/browse/TORQUE-147
>             Project: Torque
>          Issue Type: Improvement
>            Reporter: Thomas Fischer
>            Assignee: Thomas Fischer
>
> Currently it is an error if database objects do not inherit from BaseObject. This makes
embedding of Torque objects in other frameworks very difficult, because it does not allow
to choose an own parent to inherit from.
> The minimum requirement would be that it is not required any more that database objects
inherit from BaseObject.
> Ideally BaseObject dies and the base objects inherit directly from java.lang.object.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message