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
Allow multiple keyspaces in one Spring context [DATACASS-290] #461
Comments
Mark Paluch commented Using multiple keyspaces (various It's not possible to use one
Your only solution is configuring the required infrastructure ( |
Huge B commented Getting the following error with multiple keyspaces: found 2 beans of types [interface com.datastax.driver.core.Session,class org.springframework.data.cassandra.config.CassandraSessionFactoryBean] - can't disambiguate for creation of default [org.springframework.data.cassandra.core.CassandraTemplate] Why doesn't the cassandra namespace support using multiple keyspaces? Seems like all it would have to do is not create the default CassandraTemplate instance if others are already defined |
Mark Paluch commented
|
Mark Paluch commented Switching this issue to Bug because the XML config allows specifying multiple beans with different Id's but the post-processor throws |
Ryan adams commented I keep running into this issue when trying to use the SpringJUnit4ClassRunner. Not sure why, but it doesn't seem to have an issue when I instantiate the Spring beans via the ConfigurabeApplicationContext. Anyway, the fix seems rather easy: Line 88 in the CassandraMapperBeanFactoryPostProcessor: From this: |
Cezary Kluczyński opened DATACASS-290 and commented
Currently there is no way of having entities mapped to tables in different keyspaces in a single Spring context. Is it something planned for future releases?
What's the recommended way of handling that kind of situation right now?
Referenced from: pull request #76
Backported to: 1.5 GA (Ingalls)
1 votes, 4 watchers
The text was updated successfully, but these errors were encountered: