Can you tell us how did you exactly installed Glorp ? <br><br>thanks<br><br>Mariano<br><br><div class="gmail_quote">On Sat, Feb 20, 2010 at 10:47 PM, Yanni Chiu <span dir="ltr">&lt;<a href="mailto:yanni@rogers.com">yanni@rogers.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Here&#39;s the relevant code from GlorpTutuorial.pdf, pages 13/14.<br>
<br>
GlorpTutorialDescriptor &gt;&gt;tableForPEOPLE: aTable<br>
(aTable createFieldNamed: &#39;ID&#39; type: platform sequence) bePrimaryKey.<br>
(aTable createFieldNamed: &#39;first_name&#39; type: (platform varChar: 50)).(aTable createFieldNamed: &#39;last_name&#39; type: (platform varChar: 50)).<br>
----<br>
Begin Transaction<br>
CREATE TABLE PEOPLE (ID serial NOT NULL ,FIRST_NAME varchar(50) NULL<br>
,LAST_NAME varchar(50) NULL , CONSTRAINT PEOPLE_PK PRIMARY KEY  (ID),<br>
CONSTRAINT PEOPLE_UNIQ UNIQUE  (ID))<br>
Commit Transaction<br>
----<br>
session beginUnitOfWork.<br>
person := Person first: &#39;Roger&#39; last: &#39;Whitney&#39;.<br>
session register: person.<br>
session commitUnitOfWork<br>
<br>
It&#39;s pretty straightforward, define ID as primary key, leave it&#39;s value nil, and expect Glorp to fill in the ID value. That&#39;s what the tutorial says should happen.<br>
<br>
I&#39;m using the native PostgreSQL driver, not SqueakDBX. I doubt it matters in this case, I don&#39;t see any code generated to retrieve the sequence value. I may even have made changes to get it to generate SERIAL type.<br>

<br>
Thanks for confirming that it&#39;s still using the old port from years ago. While Glorp has not changed much in the last few years, at the time the original Squeak port was done, there was still active development going on.<br>

<br>
Not all the Glorp tests passed, but I&#39;m pretty sure the two or three failures were unrelated. I think they had to do with BLOB/CLOB.<br>
<br>
-- <br>
Yanni<br>
<br>
<br>
<br>
Mariano Martinez Peck wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">
Hi Yanni,<br>
<br>
I am in holidays, so I won&#39;t be able to look too much at it until Monday.<br>
<br>
It is not clear for me if you are using GlorpDBX (using SqueakDBX driver) or just Glorp with the native PostgreSQL driver ? If it is the second, please ask in GLORP mailing list where you will probably receive more help.<br>

<br>
First, yes, the Squeak/Pharo version is quite old in compare to the one of VW. This version may be even 2 or more years old. We need to make a new port, but noone of us have the time to do it so far. I guess we will do it some day.<br>

<br>
Regarding your question, did you run the Glorp tests? they should all be green. I ask because I think there are tests for what you say.<br>
<br>
Even more, do you have a simple test I can run so that to reproduce the problem ?<br>
<br>
If you use Glorp + native postgresql driver, does it work correctly ? I ask to see where the problem can came from.<br>
<br>
Thanks!<br>
<br>
Mariano<br>
<br>
<br></div><div class="im">
On Thu, Feb 18, 2010 at 6:55 PM, Esteban Lorenzano &lt;<a href="mailto:estebanlm@gmail.com" target="_blank">estebanlm@gmail.com</a> &lt;mailto:<a href="mailto:estebanlm@gmail.com" target="_blank">estebanlm@gmail.com</a>&gt;&gt; wrote:<br>

<br>
    Hi, sorry for the delay...<br>
    are you using SqueakDBX/GlorpDBX or just Glorp with Postgresql... if<br>
    that is the case, I will say &quot;I don&#39;t know&quot;, we are working on the<br>
    squeakdbx version postgresql drivers and glorp.<br>
    The postgresql version of glorpdbx should, of course, behave as<br>
    expected :)<br>
<br>
    Cheers,<br>
    Esteban<br>
<br>
    El 17/02/2010, a las 12:27p.m., Yanni Chiu escribió:<br>
<br>
     &gt; On page 14 of<br>
    <a href="http://www.eli.sdsu.edu/SmalltalkDocs/GlorpTutorial.pdf" target="_blank">http://www.eli.sdsu.edu/SmalltalkDocs/GlorpTutorial.pdf</a>, it says:<br>
     &gt;<br>
     &gt; &quot;When a session has a registered Person object with a nil value<br>
    for the id instance variable, GLORP retrieves the next value in the<br>
    id sequence and sets the id.&quot;<br>
     &gt;<br>
     &gt; I&#39;m running with the Squeak/Pharo version of Glorp, with<br>
    Postgres, and this auto sequence did not work. Is this because the<br>
    Squeak version is much older? How does the Squeak version compare<br>
    with the latest VW version of Glorp?<br>
     &gt;<br>
     &gt; Thanks.<br>
     &gt;<br>
     &gt; --<br>
     &gt; Yanni<br>
     &gt;<br>
     &gt; _______________________________________________<br>
     &gt; SqueakDBX mailing list<br>
     &gt; <a href="mailto:SqueakDBX@lists.squeakfoundation.org" target="_blank">SqueakDBX@lists.squeakfoundation.org</a><br></div>
    &lt;mailto:<a href="mailto:SqueakDBX@lists.squeakfoundation.org" target="_blank">SqueakDBX@lists.squeakfoundation.org</a>&gt;<div class="im"><br>
     &gt; <a href="http://lists.squeakfoundation.org/mailman/listinfo/squeakdbx" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/squeakdbx</a><br>
<br>
    _______________________________________________<br>
    SqueakDBX mailing list<br>
    <a href="mailto:SqueakDBX@lists.squeakfoundation.org" target="_blank">SqueakDBX@lists.squeakfoundation.org</a><br></div>
    &lt;mailto:<a href="mailto:SqueakDBX@lists.squeakfoundation.org" target="_blank">SqueakDBX@lists.squeakfoundation.org</a>&gt;<div class="im"><br>
    <a href="http://lists.squeakfoundation.org/mailman/listinfo/squeakdbx" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/squeakdbx</a><br>
<br>
<br>
<br>
------------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
SqueakDBX mailing list<br>
<a href="mailto:SqueakDBX@lists.squeakfoundation.org" target="_blank">SqueakDBX@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/squeakdbx" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/squeakdbx</a><br>
</div></blockquote><div><div></div><div class="h5">
_______________________________________________<br>
SqueakDBX mailing list<br>
<a href="mailto:SqueakDBX@lists.squeakfoundation.org" target="_blank">SqueakDBX@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/squeakdbx" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/squeakdbx</a><br>
</div></div></blockquote></div><br>