in my database I have a table articles where I store various information about articles.
A simplified version of the table is:
Code: Select all
create table articles
(
article_id serial, -- 1
name text, -- Dell Laptop
number text, -- A0001-DL
primary key (article_id)
);
Code: Select all
select article_id,
name,
number
from articles
order by article_id;
The strange thing is that no constraints or primary key (the properties of PgSqlDataTable) get created.
Screenshot: http://i.imgur.com/oar4NTP.png
I figured out that this happens because of the article number column that is named number.
For testing purposes I renamed the column number to numbera and the constraints and primary key got added correctly.
Constraints and Primary Key will also not get created when there is a subselect inside the SelectCommand.
So for example:
Code: Select all
select article_id,
(select pg_backend_pid())
from articles
order by article_id;