How can I get the Primary Key from SQLContainer


is there any chance to get the primary key of a Item from the SQLContainer, when I only have the value of the non primary Key Column?

like i have a Table which have only 2 Columns


and i only have the Text in sql it would be like

select id from table where text= ‘text’

Thank you in advance

The only ways would be to iterate over the container/table or to recreate the Container.
Iteration: for(Iterator i = container.getItemIds().iterator();i.hasnext();){ Item item = container.getItem(; if(item.getItemProperty("TEXT").getValue.equals("text")) //Do something } Maybe you also could manually create a connection + statment and execute a query giving you the wanted resultset. Iterating over a resultset is quicker then iterating over a container or table.