You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Andreas Ames <an...@tenovis.com> on 2003/05/27 13:26:45 UTC
Newbie questions (a lot of)
Hi all,
I'm using 1.0-rc3 with sun jdk 1.4.1; I'm further using the mssql-ms
profile (with Microsoft's jdbc driver for MSSQL 2000). I've got
several questions/notes till now:
1) For the ant target prepare-testdb I get an error when creating the
REF_REPOSITORY table, because the primary key constraint includes
columns which may be NULL (which SQLServer rejects).
2) For the junit target two of the three tests fail:
org.apache.ojb.broker.AllTests reports one failure and two errors,
org.apache.ojb.odmg.AllTests reports one failure. I _guess_ that's
because of the problem I reported under 1), but I would like to
verify that there are no other problems. Is there any logfile or
something else for the junittests where I could find exactly what
went wrong?
3) I've tried reversedb and reversedb2 and (with reversedb2) I could
see that the tools are reading my schema correctly. But for the
life of mine I can't make the tools write any line of XML (or even
java) for me. This might be simply the problem that I don't know
how to use these tools. Can someone offer some help?
4) browse-db doesn't seem to offer mssql as a supported platform. Can
I nevertheless use it with SQLServer anyhow?
5) AFAICS, the faq recommends the ODMG interface of OJB. I understand
that JDO is not yet an option but I would be interested in why the
PersistenceBroker is not taken into account there. Can someone
offer advise about that?
6) AFAICS, the odmg interface requires every db operation to be
surrounded by a transaction but I don't want/need the performance
penalty of a real db-transaction for every access. I _guess_ I can
instruct OJB somehow to not map a odmg transaction to a real
db-transaction for a given Implementation instance (by config or
even at runtime??). If this assumption is right, what do I do if I
want to handle some operations with real transactios and some
without? I _guess_ I can create two different Implementation
instances, one configured to map to real transactions and the other
without transactions and use them as appropriate. But is this
assumption correct? Are there tutorials on how to use different
Implementation instances concurrently?
TIA,
andreas
Re: Newbie questions (a lot of)
Posted by Andreas Ames <an...@tenovis.com>.
Andreas Ames <an...@tenovis.com> writes:
> profile (with Microsoft's jdbc driver for MSSQL 2000). I've got
> several questions/notes till now:
While I am at it (this is a little OT), can someone tell me how to set
sgml-parent-directory for emacs' psgml to work seamlessly with the
different subdocuments of repository.xml (i.e. repository_database.xml
and repository_user.xml)?
TIA,
andreas
class descriptors & data views
Posted by Joe Taylor <jo...@jtinnovations.com>.
Hi Folks,
Just looking for a way to retrieve different views of data, the scenario
is this. I have a table (table1) with a relationship to another table
(table2), at times I may want to retrieve all the information from
table1 and the related information from table2, however, there are other
times when I may only wish to retrieve a summary of information from table1.
I've tried this by setting up two different value objects, one that
contains a full view and the other as a summary view - then built a
matching class-descriptor for each. When I run my query in both
situations it appears to work, however the debug shows me something that
I wouldn't expect when running the summary query, it shows that the
executeQuery is using the summary class as expected, however, the actual
SQL shows a select that contains ALL of the columns on the table (in
this example table1). If I proceed to comment out the class-descriptor
that reflects the full view and re-run my summary test the SQL is as I
expect containing only the summary fields - if this makes sense does
anyone have any idea of what I might be doing wrong? I thought this was
doable but maybe I have to approach getting different views of data in
another way.
Any input is appreciated, thanks.
Joe