Re: Maven + HIbernate3 + Annotations, problems with SchemaExport
Hendrik Schreiber <hs-doAduxQln/dWk0Htik3J/[email protected]>
| Newsgroups | gmane.org.user-groups.trijug.juglist |
|---|---|
| Message-ID | <[email protected]> |
You'll still need to list your annotated classes in hibernate.cfg.xml
and put that in the classpath:
<!DOCTYPE hibernate-configuration SYSTEM
"http://hibernate.sourceforge.net/hibernate-
configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
[...]
<mapping class="com.yourcorp.AnnotatedClass"/>
</session-factory>
</hibernate-configuration>
-hendrik
tagtraum industries incorporated
http://www.tagtraum.com/
http://www.beatunes.com/
On May 19, 2008, at 13:22 , Brian Weaver wrote:
> I'm hoping someone on the list might be able to give me a clue on what
> I'm doing wrong with Hibernate. What seems like a very simple problem
> has been driving me insane for the last few days. No amount of
> searching on google, reading the documentation, or scouring the FAQs
> seem to have helped me much.
>
> My problem is fairly straightforward. I've created a few classes that
> have javax.persistence annotations so that my all of my configuration
> information is in a single class. This avoids me having to keep the
> java source files in synchronization with the *.hbm.xml files. Now
> that I have the annotated class files I want to use Hibernate's
> SchemaExport tool to generate my initial SQL tables. The idea is for
> me to do all the work using annotations, then generate my scheme,
> clean it up a bit (indexing, etc), and then create the database.
>
> After fighting with Eclipse and maven I have the schema export tool
> running, but it doesn't seem to process any of my annotated files.
>
> Any ideas?
>
> -- Weave
>
> --
>
> /* insert witty comment here */
>
> _______________________________________________
> Juglist mailing list
> [email protected]
> http://trijug.org/mailman/listinfo/juglist_trijug.org