Here is how I was creating the table (I got the code from the
tutorial):
| login accessor session |login := Login new database:
PostgreSQLPlatform new;username: 'Frank';password:
'xxxxxx';connectString: 'localhost:5432_postgres'.accessor :=
DatabaseAccessor forLogin: login.accessor login.session :=
GlorpSession new.session system: (PortfolioDescriptor forPlatform:
login database).session accessor: accessor.accessor dropTables:
session system allTables.
session inTransactionDo: [session system allTables do: [:each |
accessor createTable: each ifError: [:error |Transcript show: error
messageText]]].
This code did create the PORTFOLIO table but caused the problem I
originally reported.
As you suggested, I used
PortfolioDescriptor createTablesFor: login
to create the table and that worked. I was able to add records with
no trouble.
In an attempt to determine what I was doing wrong I deleted the table
and went back to the code that I originally used to create the table.
The code that was failing now works! I am not sure what was wrong but
at least I have something working. I suspect (and I am only guessing)
that this was some type of caching related problem.
Thanks for you help,Frank