--
---
You received this message because you are subscribed to the Google Groups "Ebean ORM" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ebean+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You are not looking to use docker to run the database?
> Note: above situation could be solved with multiple databases, where each developer gets their own dedicated db, but that's currently not an option.
What is the database?Why is it not an option for the developers to have their own DB?You are not looking to use docker to run the database? Obvious question I guess but this is to me is has been such a nice and significant productivity jump I've had myself that I expect everyone to be using it - we've made this so darn easy to various databases via docker I presume you are not using one of the usual databases?Cheers, Rob.
On Fri, 12 Apr 2019 at 11:15, <vladimir....@tealium.com> wrote:
--Let's say we have a single database and 3 schemas with parameterized names:So for two developers Katie and Tom, there would be a database with 6 schemas:
- {env}_{env_id}_schema1
- {env}_{env_id}_schema2
- {env}_{env_id}_schema3
- dev_katie_schema1
- dev_katie_schema2
- dev_katie_schema3
- dev_tom_schema1
- dev_tom_schema2
- dev_tom_schema3
Ebean entities leave @Table annotation attribute "schema" blank and rely on "ebean.dbSchema" in "ebean.properties" file. This results in a config file for every schema (not a big deal), but also implies 3 Ebean Database objects end up being created for the same underlying database (seems wasteful).Is there a clever way of avoiding that? Ideally I would want a single "db connection pool" used by 3 Ebean Database objects (each having their own respective default schema based on a config file).Note: above situation could be solved with multiple databases, where each developer gets their own dedicated db, but that's currently not an option.
---
You received this message because you are subscribed to the Google Groups "Ebean ORM" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eb...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ebean+un...@googlegroups.com.
We really don't want a AWS dependency
Ok I hear you. There might not be a perfect solution for ... "local development and testing of AWS lambda's that use AWS RDS".When I've done this myself I'm not looking to do development and testing in AWS. Roughly speaking, I'm looking to split the problem into 2 (with the vast majority of business logic & testing having NO dependency on AWS at all) so:1. AWS "marshalling" some payload to call a service method (Some AWS dependency)2. The service method that takes a payload and does stuff (No AWS dependency at all)We can do everything from 2. down locally with no AWS dependency at all. Hopefully this is 95%+ of the business logic. We really don't want a AWS dependency on this. We could even release this into our nexus as a library that is used by a lambda or a rest service etc.We can test "marshalling" payloads locally with some AWS dependency but without needing to run AWS lambda in AWS.That leaves us with not much untested wrt running the lambda in AWS itself.I think spring have some stuff here for running lambda's locally? Not sure maybe someone else can pitch in here?To me this is somewhat analogous to rest api's where the "service layer" knows nothing about the web/marshalling etc.How does any of that sound?Cheers, Rob.
We really don't want a AWS dependency
Totally agree. Baking AWS Services into our "local" development process never felt right. Some of our challenges are likely organizational and not technological. "People" like the idea when dev, qa, staging and prod environments are all the same. One source of "truth" to build them all, and then nobody can say "well it worked on my local".
There is https://github.com/lambci/docker-lambda which looks promising. If our team buys in, perhaps Postgres & Lambda can run in docker and call it a day.
Thank you for you feedback! :)
To unsubscribe from this group and stop receiving emails from it, send an email to ebean+un...@googlegroups.com.
class SchemaPrefixNamingConvention extends UnderscoreNamingConvention {
private String schemaPrefix;
private SchemaPrefixNamingConvention(String schemaPrefix) { this.schemaPrefix = schemaPrefix; }
/** * Code is mostly duplicated from {@code AbstractNamingConvention#getTableNameFromAnnotation()} * but with an extra addition of prefix-ing schema names. */ @Override protected TableName getTableNameFromAnnotation(Class<?> beanClass) { final Table t = AnnotationUtil.findAnnotationRecursive(beanClass, Table.class); if (t != null && !isEmpty(t.name())) { return new TableName(quoteIdentifiers(t.catalog()), quoteIdentifiers(schemaPrefix + t.name()), quoteIdentifiers(t.name())); } else { return null; // no annotation provided, default naming convention will kick in instead } }}