Outer join in hibernate
Hi,
Beforehand I know this is not the proper forum to post questions about hibernate, but I'm desperetly looking answers for this problem, so any help is welcome:
My original Oracle SQL query looks like:
select R.orden as Orden, Max(R.fichero) as Fichero,
Max(R.msgid) as MsgId, max(R.timestamp) as timestamp,
Max(R.idusuario) as IdUsuario, Max(R.msgidreenviado) as MsgIdReenviado,
Max(AO.orden) as ordenAudO, Max(AO.codigoexplotacion) as CodigoExplotacionAudO,
Max(AO.valorsignifictrans) as ValorSignificTransAudO, Max(AO.estado) as EstadoAudO,
Max(AO.tipoapunte) as TipoApunteAudO, Max(AO.timestamp) as TimeStampAudO,
Max(AO.msgId) as MsgIdAudO, Max(AO.codigointerfaz) as CodigoInterfazAudO,
Max(AB.orden) as ordenAudB, Max(AB.codigoexplotacion) as CodigoExplotacionAudB,
Max(AB.fecha) as FechaAudB, Max(AB.codigoInterfaz) as CodigoInterfazAudB,
Max(AB.programa) as programaAudB, Max(AB.qmanager) as QManagerAudB,
Max(AB.fichero) as FicheroAudB, Max(AB.tamanofichero) as TamanoFicheroAudB,
Max(AB.estado) as EstadoAudB, Max(AB.almacenada) as AlmacenadaAudB,
Max(AB.tipoapunte) as TipoApunteAudB, Max(AO.timestamp) as TimeStampAudB,
Max(AB.caducidad) as caducidadAudB
from Reenvios R, AuditoriasOnline AO, AuditoriasBatch AB
where
R.timestamp >= to_date( '21/8/07' ,'dd/mm/yy HH24:MI')
and R.timestamp <= to_date( '22/8/07' ,'dd/mm/yy HH24:MI')
and R.msgid=AO.msgId(+)
and R.fichero=AB.fichero(+)
group by R.orden order by max(R.timestamp) Desc
And after trying to convert it to hibernate it became:
select R.orden, max(R.fichero), max(R.msgid), max(R.timestamp),
max(R.idusuario), max(R.msgidreenviado), max(AO.orden),
max(AO.codigoexplotacion), max(AO.valorsignifictrans), max(AO.estado),
max(AO.tipoapunte), max(AO.timestamp), max(AO.msgid),
max(AO.codigointerfaz), max(AB.orden), max(AB.codigoexplotacion),
max(AB.fecha), max(AB.codigointerfaz), max(AB.programa),
max(AB.qmanager), max(AB.fichero), max(AB.tamanofichero),
max(AB.estado), max(AB.almacenada), max(AB.tipoapunte),
max(AO.timestamp), max(AB.caducidad)
from
Reenvios R left join AuditoriasOnline AO with R.msgid=AO.msgid,
Reenvios R2 left join AuditoriasBatch AB with R2.fichero=AB.fichero
where
R.timestamp >= to_date( ? ,'dd/mm/yy HH24:MI')
and R.timestamp <= to_date( ? ,'dd/mm/yy HH24:MI')
and R.timestamp=R2.timestamp
group by R.orden
order by max(R.timestamp) desc
However ar runtime hibernate complains that the 'from' part of the query is not properly set.
Thanks in advanced!
Unfortunely spits the error:
ERROR - org.springframework.orm.hibernate3.HibernateQueryException: unexpected token: ON near line 1, column 614 [select R.orden, max(R.fichero), max(R.msgid), max(R.timestamp), max(R.idusuario), max(R.msgidreenviado), max(AO.orden), max(AO.codigoexplotacion), max(AO.valorsignifictrans), max(AO.estado), max(AO.tipoapunte), max(AO.timestamp), max(AO.msgid), max(AO.codigointerfaz), max(AB.orden), max(AB.codigoexplotacion), max(AB.fecha), max(AB.codigointerfaz), max(AB.programa), max(AB.qmanager), max(AB.fichero), max(AB.tamanofichero), max(AB.estado), max(AB.almacenada), max(AB.tipoapunte), max(AO.timestamp), max(AB.caducidad) from com.endesa.daoeai.data.hibernate.Reenvios R left join AuditoriasOnline AO ON R.msgid=AO.msgid, com.endesa.daoeai.data.hibernate.Reenvios R2 left join AuditoriasBatch AB ON R2.fichero=AB.fichero where R.timestamp >= to_date( ? ,'dd/mm/yy HH24:MI') and R.timestamp <= to_date( ? ,'dd/mm/yy HH24:MI') and R.timestamp=R2.timestamp group by R.orden order by max(R.timestamp) desc ]; nested exception is org.hibernate.hql.ast.QuerySyntaxException: unexpected token: ON near line 1, column 614 [select R.orden, max(R.fichero), max(R.msgid), max(R.timestamp), max(R.idusuario), max(R.msgidreenviado), max(AO.orden), max(AO.codigoexplotacion), max(AO.valorsignifictrans), max(AO.estado), max(AO.tipoapunte), max(AO.timestamp), max(AO.msgid), max(AO.codigointerfaz), max(AB.orden), max(AB.codigoexplotacion), max(AB.fecha), max(AB.codigointerfaz), max(AB.programa), max(AB.qmanager), max(AB.fichero), max(AB.tamanofichero), max(AB.estado), max(AB.almacenada), max(AB.tipoapunte), max(AO.timestamp), max(AB.caducidad) from com.xxx.yyy.data.hibernate.Reenvios R left join AuditoriasOnline AO ON R.msgid=AO.msgid, com.xxx.yyy.data.hibernate.Reenvios R2 left join AuditoriasBatch AB ON R2.fichero=AB.fichero where R.timestamp >= to_date( ? ,'dd/mm/yy HH24:MI') and R.timestamp <= to_date( ? ,'dd/mm/yy HH24:MI') and R.timestamp=R2.timestamp group by R.orden order by max(R.timestamp) desc ]
which is the 'ON' keyword.
Please assist.
Similar Messages
-
How to achieve outer join operator(+) in HQL?
Dear all,
The two tables employee and customer have not explicate association (by FK and PK). In Oracle SQL, we can use the operator (+) as follows for an outer join. For example,
SELECT * FROM employee, customer where employee.name = customer.name(+)
However, HQL does not support this outer join operator. How can we translate the above SQL select to HQL?
Regards.
Pengyoushashi_rajak wrote:
Already posted in [ hibernate forum|https://forum.hibernate.org/viewtopic.php?f=1&t=997869] . This does not have to do with java.
Yes, but I did not get any solution.
Hibernate has something to do with java. You can not say for example java has nothing to do with Internet or Internet has nothing to do with Computer. Anyhow, thanks for your reply. -
The following code is an example of how to perform an outer join, in this case with ReportQuery (thanks Doug):
ExpressionBuilder eb = new ExpressionBuilder();
ReportQuery rq = new ReportQuery(Employee.class, eb);
rq.addAttribute("firstName");
rq.addAttribute("lastName");
rq.addAttribute("areaCode", eb.anyOfAllowingNone("phoneNumbers").get("areaCode"));
List<ReportQueryResult> results = (List<ReportQueryResult>) session.executeQuery(rq);My question is about the logic Toplink uses to generate the outer join statement with the "(+)" in the generated sql.
Does Toplink only generate the join statement if the same attribute is chosen in the select statement (in the above example "areaCode")?
Along the same line of questioning, does it matter which attribute was in the get() call? So, in the above example did it have to be areaCode, or could it have been any other attribute of phoneNumber, and it still would have performed the join?
In my case, because the selection attributes are built up dynamicly, should I add all attributes of my child class (my equivalent PhoneNumber class)?Thanks for your reply Doug.
One last question, hopefully.
I have a parent table with 2 child tables. When attempting an outer join with both, toplink does not attempt to outer join either. I understand why, sort of - as you get an error when attempting this in sqlplus with "(+)" syntax.
I understand that you can outer join > 1 other table to a parent with ansi sql syntax:
select dept.*,emp.*
from dept left outer join emp
on dept.deptno = emp.deptnoWill toplink allow > 1 child table outer join to a parent table? -
dear all,
since the column of table can not be boolean value, so why and can be used in join query, why "or" can not? anybody can give some example whether "and", "or" used in outer join is correct or wrong.
thanks,hai lily...
yes i have tried this example
in outer join,yes it is correct,if we want
srpecific data then we can use these
parameters ....
hope u get it..
bye -
Full outer Join:ORA-01790
Hi All,
The issue may be silly, but we cant make it out:
DB : Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - ProdWe are running the below query with no issues:
select t1.text,t2.text text2,t1.line,decode(upper(t1.text),upper(t2.text),1,0) flg
from
(select text,row_number() over(order by line) line
from user_source
where name = 'COLL_MVIEW_REFRESH_PROC_LBK'
and replace(trim(text),chr(10)) is not null
) t1,
(select text ,row_number() over(order by line) line
from user_source
where name = 'COLL_MVIEW_REFRESH_PROC'
and trim(replace(text,chr(10))) is not null) t2
where t1.line = t2.lineBut when trying for an outer join it is giving error like
ORA-01790: expression must have same datatype as corresponding expressionOuter Join Query:
select t1.text,t2.text,t1.line,decode(upper(t1.text),upper(t2.text),1,0) flg
from
(select text,row_number() over(order by line) line
from user_source
where name = 'COLL_MVIEW_REFRESH_PROC_LBK'
and replace(trim(text),chr(10)) is not null
) t1 full outer join
(select text ,row_number() over(order by line) line
from user_source
where name = 'COLL_MVIEW_REFRESH_PROC'
and trim(replace(text,chr(10))) is not null) t2
on( t1.line = t2.line )Any idea what is wrong here?
Thanks,
JeneeshNot sure what is wrong with your version. It might have to do with row_number not working on an empty row (outer joined).
How about this alternative?
The approach is a bit different, but it uses only one access to the user_source view.
select s.lineNo, min(s.text1) text1, min(s.text2) text2, decode(upper(min(s.text1)), upper(min(s.text2)), 1, 0) flag
from
(select decode(u.name, 'COLL_MVIEW_REFRESH_PROC_LBK', u.text) text1
,decode(u.name, 'COLL_MVIEW_REFRESH_PROC'
, u.text) text2
,u.name,
row_number() over (partition by u.name order by u.line) lineNo
from user_source u
where u.name in ('COLL_MVIEW_REFRESH_PROC_LBK','COLL_MVIEW_REFRESH_PROC'
/* and u.TYPE = 'PROCEDURE' */
and replace(trim(u.text),chr(10)) is not null
) s
group by s.lineNo
order by s.lineNo;Edited by: Sven W. on Nov 18, 2008 5:24 PM -
How do I find missing entries in outer join table?
Hi all,
I am trying to find records in table1 that are missing in table2. This is a simple process in SQL, but ABAP is giving me trouble. I want to do this using an outer join.
Example:
Select table1~docnumber
From table1
Left Outer Join table2
On table1docnumber = table2docnumber
Where table2~docnumber IS NULL. (the record is missing in table2)
Note: ABAP gives an error and wants me to use the Having Clause, which is ok, but then ABAP wants me to use Group By, which ok, but then I still get the same syntex error.
Any thoughts on doing this with the outer join and is null options. I do not want to select into two internal tables and compare them.All,
I am not trying to do a subquery. Just a simple outer join where I know some records are missing in the second table.
Here is the code:
select eban~banfn
into table i_delay_banfn
from eban
left outer join zsmt_prdelay_upd
on eban~banfn = zsmt_prdelay_upd~banfn
where zsmt_prdelay_upd~banfn IS NULL.
Here is the error message:
No fields from the right-hand table of a LEFT OUTER JOIN may appear in
the WHERE condition: "ZSMT_PRDELAY_UPD~BANFN".
select eban~banfn
into table i_delay_banfn
from eban
left outer join zsmt_prdelay_upd
on eban~banfn = zsmt_prdelay_upd~banfn
having zsmt_prdelay_upd~banfn IS NULL.
Please use code tags
Edited by: Rob Burbank on Mar 5, 2009 12:20 PM -
BI 7.0 Infoset - Infocube - Left outer join - query
Hi Expert,
A infoset contain Infocube and ODS, linked with left outer join, common fields are PO,PO item. PO account assignment ODS have three keyfields: PO Doc.,Item,account Assignment .
PO Infocube <b>PO Account Assignment ODS</b>
PO PO item Amt<b>PO Doc. Item AccAssignment Cost object</b>
1000 10 230 <b>1000 10 1 CC1</b>
1001 10 250 <b>1002 10 1 CC1</b>
1002 10 150 <b>1002 10 2 CC2</b>
in BEx result are like this:
1000 10 230 1 CC1
1001 10 250 # #
1002 10 150 1 CC1
1002 10 150 2 CC2 ( amount only duplicated)
The issue was that amount gets duplicated. It only occurs if PO has more than one account assignment.
In report, we want show like this
1000 10 230 1 CC1
1001 10 250 # #
1002 10 150 1 CC1
1002 10 # 2 CC2
Any suggestion or input to overcome this issue?
Thanks,
Saran
Message was edited by:
Saravanan KHi,
did you solve your problem? because I have the same issue right now: the left outer join doesn't seem to do its job.
Let me know if you have found a solution, it would be appreciated.
have a nice day,
Dominic -
BI Infoset left outer join (NW04s)
I created an Infoset using a left outer join for infoproviders:
- 0FIGL_O10 (GL transaction figures - DSO )
- 0CCA_C03 (CCA Statistical key figures - CUBE)
DSO 0FIGL_O10 is the left table with joins on:
- 0COSTCENTER
- 0FISCPER
The data set returned by Infoset appears to be based on a SQL using an
inner join.
This appears to be a bug.
We are on BI 700 SP 15.Hi Raynald - I did a demo with few records and it works fine for me. We are on 7, SP14.
-
Hi, all
Is it possible to make FULL OUTER JOIN in BI InfoSet?
If no, another question - is it possible to switch base InfoProvider? I have an InfoSet with InfoCube1 and DSO1 which I can outer join. I want to outer join InfoCube1 , not DSO1 that's why I need to switch them in the InfoSet.Hi,
In BI 7.0 Infoset has given chance to include an Info cube also,maximum you can include 2 info Cubes only in a infoset.
check the below link which helps you in understanding of the join conditions so that you can apply to your scenario.
http://help.sap.com/saphelp_nw2004s/helpdata/en/f1/713c3b35703079e10000000a114084/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/67/7e4b3eaf72561ee10000000a114084/content.htm
Regards,
Praveena. -
Left Outer Join Not working in BI 7.0 Infoset
Hi All,
I am working on BI 7.0. I have to create a report where I have to display the Target values from a target DSO against the transactional data (Operational data).
I have a DSO where for a subteam value target has been set up on different KPIs.
In the Info Cube, I have transactional data on daily basis per subteam. I have to show the actual and target values.
I have created an Info Set using Target DSO and Daily operational cube, so that I should able to compare the target and actual values of KPIs, for all the subteam values (From DSO, irrespective of whether the data is available in cube for those sub team).
I have used Outer Left Join in the Info set (DSO on left side), but I am unable to see the desired results. It is working just like an inner join.
Any Idea why the Outer Left Join is not working? The DSO has only one fey field called subteam on which I have set outer left join.
Regards,
AmitHi,
did you solve your problem? because I have the same issue right now: the left outer join doesn't seem to do its job.
Let me know if you have found a solution, it would be appreciated.
have a nice day,
Dominic -
BI 7.0 Left outer join in Infoset
Hi Everybody,
I am using BI 7.0 and have two cubes in my Infoset.
How do we set left outer join option in Infoset.
Thanks
ShilpaLook at <a href="http://help.sap.com/saphelp_nw2004s/helpdata/EN/05/7ce2416149c717e10000000a155106/frameset.htm">this</a> page. Note the text: <i>For performance reasons, you cannot define an InfoCube as the right operand of a left outer join.</i> Hope this helps...
-
Issues with using Outer join in Data Template
Hi all,
this is my data in two tables .
Table Ronny1
colA colB
1 u
2 v
3 x
Table Ronny2
colC colD
1 q
2 r
This is my data template
<dataTemplate name="MGF" dataSourceRef="Source1">
<dataQuery>
<sqlStatement name="Q1" dataSourceRef="Source1">
<![CDATA[select C, D from Ronny2]]>
</sqlStatement>
<sqlStatement name="Q2" dataSourceRef="Source2">
<![CDATA[select A , B from lokesh1 where A = :C]]>
</sqlStatement>
</dataQuery>
<dataStructure>
<group name="G1" source="Q1">
<group name="G2" source="Q2">
<element name="A" value="A"/>
<element name="B" value="B"/>
</group>
</group>
</dataStructure>
</dataTemplate>
Now this would give me result as
A B
1 u
2 v
however my requirement is this
A B
1 u
2 v
3 x
that is, i want to display all the rows of table Ronny1 and matching rows from table Ronny2. I tried modifiying my second sql as
<![CDATA[select A , B from lokesh1 where A = :C (+)]]> ( using a outer join)
but this does give me correct data and comes back with the cartesion product.
Can anyone please answer this for me that how can we use the outer join in data templaes.
Thanks
Ronnyhey vetsrini,
sorry for the confusion here,
actually i want to display all the rows from table Ronny1 and i am also pulling in the matching rows from table Ronny2 and my data structure looks as ( pulling in column D from table Ronny2)
<dataStructure>
<group name="G1" source="Q1">
<group name="G2" source="Q2">
<element name="A" value="A"/>
<element name="B" value="B"/>
<element name="D" value="D"/>
</group>
</group>
</dataStructure>
and this is what i want the output to be
A B D
1 u q
2 v r
3 x
Hence the row where A <> C the data in the D column will be null, same as in the case of outer join.
any suggestions
Thx
Ronny -
Problem with XMLTABLE and LEFT OUTER JOIN
Hi all.
I have one problem with XMLTABLE and LEFT OUTER JOIN, in 11g it returns correct result but in 10g it doesn't, it is trated as INNER JOIN.
SELECT * FROM v$version;
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
PL/SQL Release 11.2.0.1.0 - Production
"CORE 11.2.0.1.0 Production"
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
--test for 11g
CREATE TABLE XML_TEST(
ID NUMBER(2,0),
XML XMLTYPE
INSERT INTO XML_TEST
VALUES
1,
XMLTYPE
<msg>
<data>
<fields>
<id>g1</id>
<dat>data1</dat>
</fields>
</data>
</msg>
INSERT INTO XML_TEST
VALUES
2,
XMLTYPE
<msg>
<data>
<fields>
<id>g2</id>
<dat>data2</dat>
</fields>
</data>
</msg>
INSERT INTO XML_TEST
VALUES
3,
XMLTYPE
<msg>
<data>
<fields>
<id>g3</id>
<dat>data3</dat>
</fields>
<fields>
<id>g4</id>
<dat>data4</dat>
</fields>
<fields>
<dat>data5</dat>
</fields>
</data>
</msg>
SELECT
t.id,
x.dat,
y.seqno,
y.id_real
FROM
xml_test t,
XMLTABLE
'/msg/data/fields'
passing t.xml
columns
dat VARCHAR2(10) path 'dat',
id XMLTYPE path 'id'
)x LEFT OUTER JOIN
XMLTABLE
'id'
passing x.id
columns
seqno FOR ORDINALITY,
id_real VARCHAR2(30) PATH '.'
)y ON 1=1
ID DAT SEQNO ID_REAL
1 data1 1 g1
2 data2 1 g2
3 data3 1 g3
3 data4 1 g4
3 data5 Here's everything fine, now the problem:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
PL/SQL Release 10.2.0.1.0 - Production
"CORE 10.2.0.1.0 Production"
TNS for HPUX: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
--exactly the same environment as 11g (tables and rows)
SELECT
t.id,
x.dat,
y.seqno,
y.id_real
FROM
xml_test t,
XMLTABLE
'/msg/data/fields'
passing t.xml
columns
dat VARCHAR2(10) path 'dat',
id XMLTYPE path 'id'
)x LEFT OUTER JOIN
XMLTABLE
'id'
passing x.id
columns
seqno FOR ORDINALITY,
id_real VARCHAR2(30) PATH '.'
)y ON 1=1
ID DAT SEQNO ID_REAL
1 data1 1 g1
2 data2 1 g2
3 data3 1 g3
3 data4 1 g4As you can see in 10g I don't have the last row, it seems that Oracle 10g doesn't recognize the LEFT OUTER JOIN.
Is this a bug?, Metalink says that sometimes we can have an ORA-0600 but in this case there is no error returned, just incorrect results.
Please help.
Regards.Hi A_Non.
Thanks a lot, I tried with this:
SELECT
t.id,
x.dat,
y.seqno,
y.id_real
FROM
xml_test t,
XMLTABLE
'/msg/data/fields'
passing t.xml
columns
dat VARCHAR2(10) path 'dat',
id XMLTYPE path 'id'
)x,
XMLTABLE
'id'
passing x.id
columns
seqno FOR ORDINALITY,
id_real VARCHAR2(30) PATH '.'
)(+) y ;And is giving me the complete output.
Thanks again.
Regards. -
Tables
Normal EMP TABLE and dept TABLE
query
SELECT e.deptno,d.dname
FROM emp e , dept d
WHERE E.DEPTNO(+)=D.DEPTNO
AND (e.deptno=20 or e.job='CLERK')
question
When i use the above query i cannot get the extra records from dept table( 40 , OPERATIONS) due to a condition
as long as it is "OR" we cannot use outer joins.
Regardless of that condition i need to get that record(40,OPERATION)
Please reply me it is very urgent for my work now..
regards
Boopathiselect e.deptno,d.dname
FROM emp e , dept d
WHERE E.DEPTNO(+)=D.DEPTNO
AND (e.deptno=20 or e.job='CLERK')
This will only fetch the record for 20, IF you want for deptno 40 then you should remove your AND clause (AND (e.deptno=20 or e.job='CLERK'))
select * from dept
===========
DNAME DEPTNO
OPERATION 20
FINANCE 40
TRADE 22
select * from emp
===========
ENAME DEPTNO JOB
a 20 CLERK
b 22 XXX
select e.deptno,d.dname
FROM emp e , dept d
WHERE e.DEPTNO(+)=d.DEPTNO
=======================
DEPTNO DNAME
20 OPERATION
22 TRADE
FINANCE--- This is the one which does not ahve a record in emp but is there in dept hence it has been returned -
Problem with outer join/insert
I created a test case in scott schema that describes my problem. I use emp table, and I want to have one more table - emp_info - that will store some additional info about employees. Not every employee will have additional info. I can't add a field to emp table - this has to be in an additional table.
I want to display all the emp's in a swing table, and an info if it exists - of course, using outer join. Further more, I want users to be able to enter info in this same table. If info already exists in the emp_info it will be updated, if not a new record is created.
I hope you get the picture.
So, emp_info table is:
create table emp_info(empno number(4), info varchar2(10))
ALTER TABLE "SCOTT"."EMP_INFO"
ADD (CONSTRAINT "PK_EMP_INFO" PRIMARY KEY("EMPNO"))
ALTER TABLE "SCOTT"."EMP_INFO"
ADD (CONSTRAINT "FK_EMP_INFO_EMP" FOREIGN KEY("EMPNO")
REFERENCES "SCOTT"."EMP"("EMPNO"))
In Jdev I create entitiy objects for emp and emp_info, and create View object 'ViewOuter' using these two entities. emp is updatable and empinfo is updatable and reference.
SQL query for the view object is:
SELECT Emp.EMPNO, Emp.ENAME, Emp.JOB, Emp.MGR, Emp.HIREDATE,
Emp.SAL, Emp.COMM, Emp.DEPTNO, EmpInfo.EMPNO AS EMPNO1,
EmpInfo.INFO
FROM EMP Emp, EMP_INFO EmpInfo
WHERE Emp.EMPNO = EmpInfo.EMPNO(+)
I changed View row class of the ViewOuter view:
public void setInfo(String value) {
if (getEmpno1()==null) {
setEmpno1(getEmpno());
setAttributeInternal(INFO, value);
Now I create the table in swing. It works fine - if a user changes info, new record is created or existing updated etc. There is only one problem:
If I change info on an employee, and then requery the view without commiting to the database, I don't see this info. If I try to change it, I get error
(oracle.jbo.TooManyObjectsException) JBO-25013: Too many objects match the primary key oracle.jbo.Key[7499 ].
It seams that the new info is cached, but requerying the view didn't pick it up. And when it creates new row for info PK is violated.
How can I avoid this?I set up the primari key for emp_info like this:
public void setInfo(String value) {
if (getEmpno1()==null) {
setEmpno1(getEmpno());
setAttributeInternal(INFO, value);
It's set when the user enters info.
What is the difference between transaction.commit and transaction.postChanges?
Posting changes looks like good temp solution. How can I change view object, so it calls postchanges before executing query? Since I can do requery on multiple places in application, this should be handled by the view itself.
Is there any better way?
Maybe you are looking for
-
Steps to integrate ATG with siebel.
What are Steps to integrate ATG with siebel?
-
Can't repair Macintosh HD in Disk Utility (extended attributes)
Hi all, I have a Retina Macbook Pro with one of them new fancy SSDs in it. I'm running 10.9.3 all up-to-date and am a bit computer-savvy, but I'm more than puzzled by what my Mac has been doing as of late. When trying to install Windows via Bootcamp,
-
Business Area & Plant not picked in CIN entries while doing MIRO
At the time of performing MIRO, the automated entries related to cenvat clearing account for excise in CIN are made by system. At the time of excise capturing the Business Area and Plant are picked up at line item for Cenvat Clearing Account. But at
-
How to implement the schema validation with XSD in adapter module
Dear All, I am trying to develop a EJB as the file adapter mudule. Please guide me how to implement the schema validation of the source message with XSD. Or provide me the relative resources about this task. Thanks & Regards, Red Edited by: Grace Chi
-
Adding a behavior to an image with a mask?? How can you...
I want to apply the spin behavior to an image of a globe. Here is the tricky part. It has a mask on it that fades the bottom right side of the globe. How can I apply the behavior to the image but NOT the mask. I want the Mask to stay in place and the