Glorp Db2 7.8

23 views
Skip to first unread message

Suresh Kumar

unread,
Apr 30, 2013, 8:42:27 AM4/30/13
to glorp...@googlegroups.com
All,

I am working on a project which supports oracle and trying to make it to DB2 compatible. I have added the DB2 GLORP support from VW7.8 to the existing code and getting the below error . The selector tableToSelectFromIn:for: is implemented only in PGSequence. Am I missing something or a bug? Thanks in advance,

Suresh

Glorp.DB2Sequence(Object)>>doesNotUnderstand:
Receiver:
a Glorp.DB2Sequence
Instance Variables:
reservedNumbers = an OrderedCollection[0]
name = 'SEQUENCE'
tableSelectCommand = nil
schema = nil
count = 0
sequenceIncrement = 1
accessProtect = a Semaphore[0]
Arguments:
t1 = a Message with selector: #tableToSelectFromIn:for: and arguments: #(a Glorp.GlorpSession a Glorp.DatabaseTable(TSK_DESC))
Temporaries:
t2 = a MessageNotUnderstood
t3 = nil
Context PC = 25

----------------------------------------------------------------------
Glorp.DB2Sequence(Glorp.NamedSequence)>>reserveViaTableSelect:in:for:
Receiver:
a Glorp.DB2Sequence
Instance Variables:
reservedNumbers = an OrderedCollection[0]
name = 'SEQUENCE'
tableSelectCommand = nil
schema = nil
count = 0
sequenceIncrement = 1
accessProtect = a Semaphore[0]
Arguments:
t1 = 1
t2 = a Glorp.GlorpSession
t3 = a Glorp.DatabaseTable(TSK_DESC)
Temporaries:
t4 = nil
t5 = nil
Context PC = 7

----------------------------------------------------------------------
Glorp.DB2Sequence(Glorp.NamedSequence)>>reserveSequenceNumbers:in:for:
Receiver:
a Glorp.DB2Sequence
Instance Variables:
reservedNumbers = an OrderedCollection[0]
name = 'SEQUENCE'
tableSelectCommand = nil
schema = nil
count = 0
sequenceIncrement = 1
accessProtect = a Semaphore[0]
Arguments:
t1 = 1
t2 = a Glorp.GlorpSession
t3 = a Glorp.DatabaseTable(TSK_DESC)
Temporaries:
t4 = 1
t5 = nil
Context PC = 18

----------------------------------------------------------------------
optimized [] in [] in Glorp.UnitOfWork>>reserveSequenceNumbers
Receiver:
an UndefinedObject
Arguments:
t4 = a Glorp.DB2Sequence(SEQUENCE)
Temporaries:
.t3 = an OrderedCollection[1]
.self = a Glorp.UnitOfWork
.t2 = a Glorp.DatabaseTable(TSK_DESC)
Context PC = 12

----------------------------------------------------------------------
OrderedCollection>>do:
Receiver:
an OrderedCollection
Instance Variables:
firstIndex = 1
lastIndex = 1
Arguments:
t1 = BlockClosure [] in [] in Glorp.UnitOfWork>>reserveSequenceNumbers
Temporaries:
t2 = 1
t3 = 1
Context PC = 17

----------------------------------------------------------------------
optimized [] in Glorp.UnitOfWork>>reserveSequenceNumbers
Receiver:
an UndefinedObject
Arguments:
t2 = a Glorp.DatabaseTable(TSK_DESC)
t3 = an OrderedCollection[1]
Temporaries:
.self = a Glorp.UnitOfWork
Context PC = 13

Wallen, David

unread,
Apr 30, 2013, 1:04:00 PM4/30/13
to glorp...@googlegroups.com

Hi Suresh,

 

In my recent 7.10 build image, Glorp.NamedSequence>>reserveViaTableSelect:in:for: is also implemented in DB2Sequence’s superclass, OracleSequence, and so # tableToSelectFromIn:for: is never sent. Looking back over previous versions (I don’t have a shipped 7.8 version handy at the moment), it seems that this was in place even for 7.8, although I can’t verify that at the moment. Perhaps you have some code loaded which overrides that? If possible, you may want to also experiment with a 7.9.1 image, to see if that changes anything.

 

- Dave

--
You received this message because you are subscribed to the Google Groups "glorp-group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to glorp-group...@googlegroups.com.
To post to this group, send email to glorp...@googlegroups.com.
Visit this group at http://groups.google.com/group/glorp-group?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Suresh Kumar

unread,
May 2, 2013, 2:30:58 AM5/2/13
to glorp...@googlegroups.com, dwa...@cincom.com
Thanks Dave, I have tried with 7.9.1 vanilla image with only GLORP loaded (that will eliminate the possibility of my code overrides). Implementation of # tableToSelectFromIn:for: is missing in DB2Sequence(its only in PGSequence, ) If I could implement for DB2Sequence or in NamedSequence, it may solve my problem . Any suggestions?

Thanks,
Suresh

Wallen, David

unread,
May 2, 2013, 1:01:44 PM5/2/13
to glorp...@googlegroups.com

I think I may have misunderstood your needs. What I meant is that DB2Sequence doesn’t need #tableToSelectFromIn:for: (at least in VW7.9 and later). Remember that DB2Sequence inherits from OracleSequence, which uses a different approach, not involving #tableToSelectFromIn:for:. Looking at your original stack,

Glorp.DB2Sequence(Glorp.NamedSequence)>>reserveViaTableSelect:in:for:

In a 7.9 image, DB2Sequence inherits this method from OracleSequence, not NamedSequence, and so the code path (and stack) will be very different.

On the other hand, maybe I’m missing something else here.

Suresh Kumar

unread,
May 7, 2013, 12:13:41 PM5/7/13
to glorp...@googlegroups.com
Thanks Dave ..I have figured out the issue...now I am facing a new issue..the GLORP version we were using is very way old and now I am porting to 7.9.1 version. In some places our code using resultCollectionClass from old OneToManyMapping..but after upgrading to latest GLORP I don't see resultCollectionClass in OneToManyMapping or its super classes. Please suggest is there any alterate method for resultCollectionClass or its equivalent..

Regards.
Suresh

-Suresh


--
You received this message because you are subscribed to a topic in the Google Groups "glorp-group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/glorp-group/l0bzFxJkGIc/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to glorp-group...@googlegroups.com.

Wallen, David

unread,
May 7, 2013, 6:15:04 PM5/7/13
to glorp...@googlegroups.com

Hi Suresh,

 

I cannot seem to find any method named ‘resultCollectionClass’ in current or older versions of Glorp (I checked back to 2007). There is a method, OneToManyMapping>>collectionType. Perhaps that does the same thing? Otherwise, if you can verify the version of Glorp you’re using, I could check further back.

Suresh Kumar

unread,
May 8, 2013, 6:29:31 AM5/8/13
to glorp...@googlegroups.com, dwa...@cincom.com
Hi Dave,

The version we use is probably from 2002 - 2003 period. 

Thanks,
Suresh

Alan Knight

unread,
May 8, 2013, 11:48:02 AM5/8/13
to glorp...@googlegroups.com, Wallen, David
The collectionType is what you want. Note that Glorp split out some of this so that there is an actual model for the attribute and it's what holds the type, rather than the mapping. If you don't explicitly define the attribute then it will get created implicitly, and there are methods for some of its properties on the mapping as well, which is why collectionType is there.
Reply all
Reply to author
Forward
0 new messages