DBFlow icon indicating copy to clipboard operation
DBFlow copied to clipboard

Get Id of an inserted entry

Open gnuhel opened this issue 11 years ago • 2 comments

I use

        Model model = new Model();
        model.save(false);

to insert new data to the table. It is possible to get the id of the inserted entry?

gnuhel avatar Feb 11 '15 17:02 gnuhel

are you running at least 1.4.4? If its an Column.PRIMARY_KEY_AUTO_INCREMENT on save() the key is stored in the model.

agrosner avatar Feb 11 '15 17:02 agrosner

thanks

gnuhel avatar Feb 13 '15 08:02 gnuhel