-
Notifications
You must be signed in to change notification settings - Fork 307
New issue
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
DATACASS-188 - now able to supply options to table via cassandra admin otemplate #1385
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are quite some unrelated changes within a single commit. Please split at least the bugfix from the newly introduced method. The polishing changes should be part of a separate commit, can be either PR.
* @param ifNotExists If true, will only create the table if it doesn't exist, else the create operation will be | ||
* ignored. | ||
* @param tableName The name of the table. | ||
* @param entityClass The class whose fields determine the columns created. | ||
* @param optionsByName Table options, given by the string option name and the appropriate option value. | ||
*/ | ||
@Deprecated(forRemoval = true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not intent deprecating this method as a table can be created from the given Class
using a different table name.
.getCreateTableSpecificationFor(entity, entity.getTableName()) | ||
.ifNotExists(ifNotExists); | ||
|
||
if (!CollectionUtils.isEmpty(optionsByName)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actually a bugfix. Can you please split this pull request into two PR's, one for introducing an overload without accepting a table name and the other one to consider options?
@@ -961,7 +961,7 @@ protected <E extends CassandraMappingEvent<T>, T> void maybeEmitEvent(Supplier<E | |||
protected <T> T maybeCallBeforeConvert(T object, CqlIdentifier tableName) { | |||
|
|||
if (null != entityCallbacks) { | |||
return (T) entityCallbacks.callback(BeforeConvertCallback.class, object, tableName); | |||
return entityCallbacks.callback(BeforeConvertCallback.class, object, tableName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should go into a separate commit as well to separate polishing from the actual change.
@mp911de So I will just break this PR into 3 different PRs:
Am I correct? |
1 + 2 are sufficient. Feel free to have another commit with polishing in one of the two pull requests. If you like, you can reuse this PR for the bugfix and create a new one for the newly introduced method. This change would require rebase and force-pushing which is fine for now. |
@mp911de I have removed new method from this PR. Also I have introduced 2 commits - one with polishing, another with actual bugfix. Can you please re-review? P.S: I will introduce new method once this changes will occur in the main branch |
Mark @mp911de, when you will be able to rereview this PR?) I have already created a separate brunch for new overloaded method, but I am waiting for these changes to occur in main brunch to create new PR as we discussed |
Thank you for your contribution. That's merged, polished, and backported now. |
Implements #359
@mp911de, can you please check?)