|
I'm evaluating Castor for possible use at my
company, and I have a number of questions that I couldn't figure out through
experimentation or reading the documentation.
We don't have access to auto-increment features in
our DB environment, so we've been doing things with select max to mimic auto
increment in a safe guaranteed way. Is there any way to do this in
Castor?
I've noticed that within a transaction Castor can
detect whether an object has already been loaded and will instead return
the previously loaded object. However, that behavior doesn't span multiple
transactions. We're already doing this in our factory objects to ensure
that each object that should be unique is in fact unique. Can Castor do
this, or do we have to supply this behavior ourselves?
The one-to-many stuff in Castor is nice, but what I
want to do looks like this:
Table: permissions_table
Foreign key: group_id
Table: principle_table
Foreign key: group_id
Table: grouping_table
Primary key: group_id, group_type
where the permissions_table and principle_table
both map their foreign keys to the grouping_table, but the
grouping_table.group_type would be a constant like 'permission' to indicate what
table is being mapped from. Is there any way to do this in Castor with the
XML mapping or would I need to use OQL for this?
Finally, I wondered why the OQL queries used the
"bind" method which looks totally unlike JDBC prepared statements which use
"set" methods. Seems kind of strange...
Thanks in advance for any comments you can provide
to help me determine whether Castor is a solution we'd like to
use...
|
