English 中文(简体)
使用甲骨质的乙ug?
原标题:Hibernate bug using Oracle?

我提到这个问题,即我使用<代码>persistence.xml中的财产,迫使Hibernate只能看特定图象中的表格。

<property name="hibernate.default_schema" value="FOO"/>

由于我们现在使用4种不同的图表,实际解决办法是制作4份战争档案,并修改<代码>persistence.xml。

这不是说谎。

是否有任何人知道,我如何把该图象与财产混为一谈,或操纵日本银行的连接?

I m 采用Oracle 10g, 10_2_3 Patch。

感谢很多。

问题回答

您可以为四种不同应用在矿石数据库中创建4个不同的用户,而亚洲开发银行的链接将包括用户。

对于用户来说,你可以为表格制作同义词和许可。

E.g.

create or replace synonym USER1.tablename FOR SCHEMA1.tablename;  
create or replace synonym USER2.tablename FOR SCHEMA1.tablename;  
create or replace synonym USER3.tablename FOR SCHEMA2.tablename;  

当你从藏匿处获取表格时,就离开了chem。 当装上美国ER1时,它便使用SCHEMA1等。

这样,你就不必制作4份带有4份不同持久性的WAR档案。 仅用四次不同的支架。

希望会有所帮助。

如果你不想产生四种不同的WAR,那么将这种财产列入一个<条码>hibernate.properties的档案中,并将该档案放在分类上(outside<>em>)。 每一份网络应用程序。

我创建了一种称为“欺骗性”的方法,在我召集会议时,我可以采用这种方法。 它利用数据来源打开了支离破碎的连接(因为你没有举行过自由会议,而是询问了“双向用户”以登入用户。 如果用户也拥有表格,则准确无误。 如果不是的话,我就利用了一种支离破碎的环境。

一俟我有计划,我就修改了Hibernate配置,为每个表格确定,尽管这只有在用户的档次与计划不同的情况下才有必要:

for (Iterator iter = configuration.getTableMappings(); iter.hasNext();) {
  Table table = (Table) iter.next();
  table.setSchema(schema);
}




相关问题
Export tables from SQL Server to be imported to Oracle 10g

I m trying to export some tables from SQL Server 2005 and then create those tables and populate them in Oracle. I have about 10 tables, varying from 4 columns up to 25. I m not using any constraints/...

Connecting to Oracle 10g with ODBC from Excel VBA

The following code works. the connection opens fine but recordset.recordCount always returns -1 when there is data in the table. ANd If I try to call any methods/properties on recordset it crashes ...

How to make a one to one left outer join?

I was wondering, is there a way to make a kind of one to one left outer join: I need a join that matches say table A with table B, for each record on table A it must search for its pair on table B, ...

Insert if not exists Oracle

I need to be able to run an Oracle query which goes to insert a number of rows, but it also checks to see if a primary key exists and if it does, then it skips that insert. Something like: INSERT ALL ...

How can I store NULLs in NOT NULL field?

I just came across NULL values in NOT-NULL fields in our test database. How could they get there? I know that NOT-NULL constraints can be altered with NOVALIDATE clause, but that would change table s ...

Type reference scope

I m studying databases and am currently working on a object-relational DB project and I ve encountered a small problem with the number of possible constraints in an object table. I m using "Database ...

OracleParameter and DBNull.Value

we have a table in an Oracle Database which contains a column with the type Char(3 Byte). Now we use a parameterized sql to select some rows with a DBNull.Value and it doesn t work: OracleCommand ...