long myId = ((Number)SQLSelect.dataRowQuery("select nextval('mytable_seq' as id").selectOne(ec).get("id")).longValue();
On Wed, May 23, 2018 at 3:52 PM Tony Giaccone <t...@giaccone.org> wrote: > Imagine I have a field in a persistent object, the field is not the primary > key, and I want it to be unique. So the obvious choice to me is to use a > sequence value from the db, so that I can avoid trying to calculate a value > in java. > > Is there an easy way to access that sequence value, from java, using > Cayenne? > > > Tony >