This reverts commit 7f702af482.
Reason for revert: this patch was introduced to make the database
produced code compatible with PostgreSQL. During this cycle we
dropped the support for this backend. This patch is probably
introducing a race condition when retrieving the port standard
attributes because these are retrieved in a second SQL query
(lazy='selectin').
In order to keep a healthy database engine, supporting
MariaDB/MySQL, it is better to retrieve the selected field in the
``port`` retrieval query instead of issuing a delayed second one.
Closes-Bug: #2093258
Change-Id: Ida5afffb808597aa09cc62984b36189a8bf409a0