Bug #2111 | add a rs.copy(busObject) method | ||
---|---|---|---|
Submitted: | 14 Dec 2003 5:44 | Modified: | 15 Dec 2003 7:06 |
Reporter: | Ralf Hauser | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / J | Severity: | S4 (Feature request) |
Version: | 0312 nightly | OS: | Any (any) |
Assigned to: | Mark Matthews | CPU Architecture: | Any |
[14 Dec 2003 5:44]
Ralf Hauser
[14 Dec 2003 6:24]
Mark Matthews
There are many fine frameworks that already do this, like Hibernate, OJB, Torque, , JDO, etc. There is also talk in the JDBC expert group for JDBC-4.0 to have some rudimentary object-relational-mapping support. Until there is a standard for JDBC, I recommend you investigate one of the existing O-R frameworks out there, because it is unlikely we will add a non-standard method of doing this to the JDBC driver.
[15 Dec 2003 0:46]
Ralf Hauser
thx for the hint. But don't these all add much more overhead than just the copy-related one? Wouldn't one loose the control over the exact sql statement when using those?
[15 Dec 2003 7:06]
Mark Matthews
Object-relational mapping is a complex topic, and even a 'simple' mapper like you propose has a lot of caveats once you start talking about making the data 'flow' in both directions (in and out of the database), as well as managing state correctly. If you take a look at many of the tools I mentioned, many of them can in some cases be _faster_ than straight JDBC, because of the caching they can do, as well as writing more efficient queries than most developers can (Hibernate is one example of this).
[16 Dec 2003 23:32]
Ralf Hauser
Mark, just stumbled over http://jakarta.apache.org/commons/dbutils/apidocs/org/apache/commons/dbutils/handlers/Bean... and http://jakarta.apache.org/commons/dbutils/apidocs/org/apache/commons/dbutils/handlers/Bean... Do you have any experience with those? Could they do what I want? Rgds r.