We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
class AndroidPersistenceManager
public long save(Object o) { { ... } Long primaryKey = 0L; String tableName = cache.getTableName(); try { primaryKey = database.insert(tableName, null, values); } catch(SQLException e) { throw new AndOrmPersistenceException(MessageFormat.format(bundle.getString("save_error"), o.getClass().getCanonicalName(), e.getMessage())); } PrimaryKeyProperty primaryKeyProperty = cache.getPk(); if (primaryKeyProperty.isAutoInc()) { if (primaryKeyProperty.getDatabaseFieldType().equals(Integer.class)) { primaryKeyProperty.set(o, primaryKey.intValue()); } else if (primaryKeyProperty.getDatabaseFieldType().equals(Long.class)) { primaryKeyProperty.set(o, primaryKey); } } if (cache.getAfterSaveMethod() != null) { invoke(o, cache.getAfterSaveMethod()).withoutParams(); } return primaryKey; }
Would be interesting to return the primary key value.
[]'s
The text was updated successfully, but these errors were encountered:
Can you fork the project and push this feature?
Sorry, something went wrong.
Yes I can. :)
If possible, write the unit test ;)
No branches or pull requests
class AndroidPersistenceManager
Would be interesting to return the primary key value.
[]'s
The text was updated successfully, but these errors were encountered: