ValidationError class

2 views
Skip to first unread message

Milan Mimica

unread,
May 26, 2012, 11:45:21 AM5/26/12
to DBXTalk
Hello!

I just noticed that ValidationError>>model: says "self parameter:
aClass", while #parameter: is not understood by the object hierarchy.
At least not in Pharo 1.4. Clearly a mistake.

Guillermo Polito

unread,
May 30, 2012, 5:43:22 AM5/30/12
to dbx...@googlegroups.com
Hi Milan!

I wonder if you can be more specific :).  Which project are you using?  Where does that class come from.

Thanks!
Guille

Milan Mimica

unread,
May 30, 2012, 9:57:13 AM5/30/12
to dbx...@googlegroups.com
On 30 May 2012 11:43, Guillermo Polito <guiller...@gmail.com> wrote:
Hi Milan!

I wonder if you can be more specific :).  Which project are you using?  Where does that class come from.

It belongs to the Glorp-Misc package.
So it's part of Glorp port. Not sure if this is the right place to complain...


--
Milan Mimica
http://sparklet.sf.net

Guillermo Polito

unread,
May 30, 2012, 10:42:22 AM5/30/12
to dbx...@googlegroups.com
Sure it is!  We will see if the right thing is to do is to report it or fix it directly on our branch.

BTW, can you provide us a little snipped of code showing how you get originally the error? :)  Because it seems it is not tested since tests never went through that case.  That way we can create a new unit test for glorp ;).

Thanks!
Guille

Milan Mimica

unread,
May 30, 2012, 2:01:17 PM5/30/12
to dbx...@googlegroups.com
On 30 May 2012 16:42, Guillermo Polito <guiller...@gmail.com> wrote:
Sure it is!  We will see if the right thing is to do is to report it or fix it directly on our branch.

BTW, can you provide us a little snipped of code showing how you get originally the error? :)  Because it seems it is not tested since tests never went through that case.  That way we can create a new unit test for glorp ;).

I have a batter idea. Why don't I provide a test for it?

Guillermo Polito

unread,
May 30, 2012, 2:02:10 PM5/30/12
to dbx...@googlegroups.com

Would be great :).

Tx!
 

Milan Mimica

unread,
May 30, 2012, 3:07:31 PM5/30/12
to dbx...@googlegroups.com
On 30 May 2012 20:02, Guillermo Polito <guiller...@gmail.com> wrote:
On Wed, May 30, 2012 at 8:01 PM, Milan Mimica <milan....@gmail.com> wrote:

I have a better idea. Why don't I provide a test for it?

Would be great :).

I just can't figure how to make a patch so here it is. Just add it to GlorpDescriptorValidationTest class.

testValidateMultipleMappingsError
| descriptor table mapping1 mapping2 system field1 field2 |
system := DynamicDescriptorSystem new.
descriptor := system addEmptyDescriptorFor: GlorpCustomer.
table := DatabaseTable named: 'Table1'.
field1 := table createFieldNamed: 'one' type: OraclePlatform new integer.
field2 := table createFieldNamed: 'two' type: OraclePlatform new integer.
descriptor addTable: table.
mapping1 := descriptor newMapping: DirectMapping.
mapping1 from: #id to: field1.
mapping2 := descriptor newMapping: DirectMapping.
mapping2 from: #id to: field2.
self should: [descriptor validate] raise: MultipleMappingsForInstanceVariable

Guillermo Polito

unread,
May 30, 2012, 3:12:05 PM5/30/12
to dbx...@googlegroups.com
:3 great.  Next week I'll work a whole day on dbx related stuff, and add it.

Thank you very much!!
Reply all
Reply to author
Forward
0 new messages