-
1. Re: MySQL Catalog (or Schema) Name not being prepended in th
martinganserer Sep 12, 2005 3:36 AM (in response to andrigtmiller)Hi,
I think it depends on the connection settings of your Data Source.
If the owner of a table is different to the user/schema account defined in the Data Source you always need the schema name!
To solve your problem you have to set a different user/schema name in your Data Source config file!
In your case it must be "prototype".
Does it work? -
2. Re: MySQL Catalog (or Schema) Name not being prepended in th
andrigtmiller Sep 12, 2005 3:10 PM (in response to andrigtmiller)That is the problem.
Thanks. -
3. Re: MySQL Catalog (or Schema) Name not being prepended in th
andrigtmiller Sep 12, 2005 10:03 PM (in response to andrigtmiller)I was pretty sure that you were correct, and I dropped the database, setup a new user, and logging as that user, and created the database again from scratch. I tested using that user to insert to the database through the MySQL Query Browser, and all worked as expected without having to specify the schema name, but it still failed to insert from the actual entity without the schema name. I also double check my data source configuration to make sure I was logging in as the owner of the schema, and I was. From the MySQL Administration tool, I could see all of the application servers connections, and they were all connected with the proper user!
This should have cleared this up, but it didn't. I'm not sure now, what else I might have wrong. Anyone have another idea? -
4. Re: MySQL Catalog (or Schema) Name not being prepended in th
epbernard Sep 13, 2005 7:04 AM (in response to andrigtmiller)hibernate.default_schema
-
5. Re: MySQL Catalog (or Schema) Name not being prepended in th
andrigtmiller Sep 17, 2005 9:52 AM (in response to andrigtmiller)I set the hibernate.default_schema property in the persistence.xml, and now it does prepend the EJB3. in front of the table name, but it also changes the table name to EJB3_Order, when the table name is just Order. So this sort of worked, but it broke the table name mapping, so instead of getting EJB3.Order I am getting EJB3.EJB3_Order! This is still not right. What else am I missing?
-
6. Re: MySQL Catalog (or Schema) Name not being prepended in th
andrigtmiller Sep 17, 2005 10:12 AM (in response to andrigtmiller)I figured it out! I needed to set the hibernate.default_catalog property instead of the hibernate.default_schema property.
Thanks for all the help on this one!