Hi Evgeny,
As always, thanks for the patch. A few comments:
1. A refactoring suggestion: move the new static methods introduced in
ColumnDescriptor to non-static methods of RowDescriptorBuilder.
2. In 3.0 unit test classes are using *Test suffix instead of *Tst,
and also we no longer put @author tags in the code.
Both items above are minor, and I can change them myself. Here is one
potentially bigger issue with the patch though:
3. The patch merges 2 strategies for creation of columns descriptor
into one, that requires access to ResultSetMetadata. I am not sure
that ResultSet.getMetaData() is a trivial operation for all JDBC
drivers that we support. I suspect there may be overhead accessing
this data at least on some DBs. While we can verify this theory, I am
wondering if we should, as in most cases we control the query syntax
and don't need to consult ResultSetMetadata at all.
So maybe preserve the flow in RowDescriptorBuilder, and use your
strategy merging explicit and implicit column descriptors *only* when
an optional metadata object is initialized?
Andrus
On Oct 9, 2009, at 2:08 PM, Evgeny Ryabitskiy (JIRA) wrote:
[ https://issues.apache.org/jira/browse/CAY-1282?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Evgeny Ryabitskiy updated CAY-1282:
-----------------------------------
Attachment: CAY-1282-3.patch
Done!
Use #result as optional directive for only few columns (not all)
----------------------------------------------------------------
Key: CAY-1282
URL: https://issues.apache.org/jira/browse/CAY-1282
Project: Cayenne
Issue Type: Improvement
Components: Cayenne Core Library
Affects Versions: 1.2.5, 2.0.5, 3.0
Reporter: Evgeny Ryabitskiy
Assignee: Andrus Adamchik
Fix For: 3.0 beta 1
Attachments: CAY-1282-3.patch, CAY-1282-3.patch,
CAY-1282-3.patch, CAY-1282-3.patch, CAY-1282-3.patch, CAY-1282.patch
Here is few queries to show the problem:
SELECT ARTIST_ID, ARTIST_NAME FROM ARTIST
- working properly
SELECT #result('ARTIST_ID' 'java.lang.Integer'),
#result('ARTIST_NAME' 'java.lang.String') FROM ARTIST
- also working properly
SELECT ARTIST_ID, #result('ARTIST_NAME' 'java.lang.String') FROM
ARTIST
- first column is returned as null!!! Not nice...
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.