chawax - only one persistence.xml will be used for one persistence unit; so
that persistence.xml would need to be in the root of the entities you want
scanned + list the classes that is "outside"
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4184004#4184004
Well, I made several files for development organization reasons : many
development teams will work on the project and they will rely on common
entities for standard needs. At the end, all these projects are merged into one
jar (t4-core-all) which will contain all entities and one unique
persist
Can you try to not give them the same name. If these are supposed to be the
same PU, why several files. If they are supposed to be different PU, why the
same name :)
Anyway I don't think it's related to your problem.
One way to work around it is to manually list the classes in persistence.xml
or
Thanks for your response Max. I have a workaround for the moment as I said, not
very convenient, but at least it exists ! It would be great anyway if Emmanuel
has a better workaround.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4183170#4183170
Reply to the
well, autoscanning don't work across the persistence unit the persistence.xml
is located in.
I'll ping emanuel to let him in explain if there are any workarounds.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4183166#4183166
Reply to the post :
http://www.j
Yes, I hardly understand why it doesn't work.
To be more precise, my t4-core-commons project contains this persistence.xml
file :
| http://java.sun.com/xml/ns/persistence";
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
| xsi:schemaLocation="http://java.sun.com/xml/ns/pe
Console just uses hibernate to load the classes/persistence.xml just like
hibernate annotations/entitymanager would do.
You can tell hibernate console which persistence unit to pick (i.e. the name of
it, not the location)
its weird that it works if you add the jar to the classpath - I wonder w
Thanks Max.
My other projects are mavenized, so I have the needed jar file :) But where
should I set ejb-jar ? Do I have to do it in a persistence.xml file ? If so,
does Hibernate look for persistence.xml file in classpath (this would be a
problem for me since I have different persistence.xml
hibernate console should just pick them up for you by being in the classpath of
the project - if not its a bug.
should also work, but you would need a jar file to be present ;)
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4182957#4182957
Reply to the post