[jbossseam-issues] Multiple Datasources with Seam-Generated POJO entities, creates all tables in both datasources
Ian Darwin
ian at darwinsys.com
Thu Oct 11 18:54:59 EDT 2007
Answering one part of my own post:
> 1) The seam-gen created code doesn't use an explicit EntityManager, but
> just an @Entity-annotated POJO for the model and two helper classes,
> ClassNameHome (extends EntityHome<ClassName>) and ClassNameList extends
> EntityQuery, neither of which has an EntityManager field. Annotating the
> various classes with the PersistenceContext does not help.
That was easy; just added these 3 lines:
@PersistenceUnit(name="tcpseambug")
@In EntityManager bugEntityManager;
public EntityManager getEntityManager() { return bugEntityManager; }
to the seam-generated Home AND Query classes.
> Secondly, perhaps as a result, all the entities get created in both
> databases.
>
> Third, how can we make sure that import.sql is only applied against
> one of the datasources?
Items 2 and 3 remain show-stoppers!
More information about the seam-issues
mailing list