db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henning P. Schmiedehausen" <...@intermeta.de>
Subject Re: AW: Can't handle same column name twice - possibly a bug in village?
Date Wed, 15 Dec 2004 17:14:52 GMT
Thomas Fischer <Fischer@seitenbau.net> writes:

Can you add this test to the CVS?

	Regards
		Henning

>Hi Daniel,

>I cannot reproduce this error, see appended test case against the tutorial
>database schema. I suppose you use your JoinHelper. Are you sure it is not
>a bug in there ?

>"Vitzethum, Daniel" <Daniel.Vitzethum@gigatronik.com> schrieb am 14.12.2004
>17:21:38:

>> Hi Thomas,
>>
>> >> In addition, where is the home of the village project?
>> > http://wiki.apache.org/db-torque/FrequentlyAskedQuestions
>>
>> I admit, it was the obvious again. A workaround for my problem
>> certainly is to have unique column names in the whole data model,
>> what means some work for us.
>>
>> Indeed it seems to be a bug in village (or at least not a feature)
>> that the same column name twice leads to wrong results.
>>
>>
>> Thank you anyway,
>>
>> Daniel
>>

>   public void testSameColumnName()
>    {
>        try
>        {
>            cleanBookstore();
>            Author author = new Author();
>            author.setName("Name");
>            author.save();

>            author = new Author();
>            author.setName("NotCorrespondingName");
>            author.save();

>            Book book = new Book();
>            book.setTitle("Name");
>            book.setAuthor(author);
>            book.setIsbn("unknown");
>            book.save();

>            Criteria criteria = new Criteria();
>            criteria.addJoin(BookPeer.TITLE, AuthorPeer.NAME);
>            BookPeer.addSelectColumns(criteria);
>            AuthorPeer.addSelectColumns(criteria);
>            // basically a BaseBookPeer.setDbName(criteria);
>            // and BasePeer.doSelect(criteria);
>            List villageRecords =
>BookPeer.doSelectVillageRecords(criteria);
>            Record record = (Record) villageRecords.get(0);
>            book = new Book();
>            BookPeer.populateObject(record, 1, book);
>            author = new Author();
>            AuthorPeer.populateObject(record, BookPeer.numColumns + 1,
>author);

>            if (book.getAuthorId() == author.getAuthorId()) {
>                fail("wrong Ids read");
>            }
>        }
>        catch( Exception e)
>        {
>            e.printStackTrace();
>            fail("Exception caught : "
>                     + e.getClass().getName()
>                     + " : " + e.getMessage());
>        }
>    }


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

-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
hps@intermeta.de        +49 9131 50 654 0   http://www.intermeta.de/

RedHat Certified Engineer -- Jakarta Turbine Development  -- hero for hire
   Linux, Java, perl, Solaris -- Consulting, Training, Development

What is more important to you...
   [ ] Product Security
or [ ] Quality of Sales and Marketing Support
              -- actual question from a Microsoft customer survey

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


Mime
View raw message