Custom Mapping: Storing embedded objects to column of Oracle Object type
Hello,
How hard in your opinion it would be to write custome mapping to store an
embedded object which only have simple fields in it (no references to other
persistent classes) to oracle object column. What superclass is the best for
the job?
Simplest approach I see is to define "none" mapped class for my embedded
object and use transformation mapping to do the job
What if I need to reference other persistent objects in my embedded one - do
you think it will make any difference?
Thank you for your assistance
Alex
overriding loadProjection() took care of this issue
"Alex Roytman" <[email protected]> wrote in message
news:cjslsb$uo6$[email protected]..
Looks like transform mapping would not work - Kodo does not support object
mappings (use stream instead) or I am missing something?
"Alex Roytman" <[email protected]> wrote in message
news:cjshqv$ref$[email protected]..
Hello,
How hard in your opinion it would be to write custome mapping to store an
embedded object which only have simple fields in it (no references to
other persistent classes) to oracle object column. What superclass is the
best for the job?
Simplest approach I see is to define "none" mapped class for my embedded
object and use transformation mapping to do the job
What if I need to reference other persistent objects in my embedded one -
do you think it will make any difference?
Thank you for your assistance
Alex
Similar Messages
-
No mapping exists from object type Telerik.Web.UI.RadMaskedTextBox to a known
hi for all i got this problem when i try to update record in a database actually it's first
time happining with me
No mapping exists from object type Telerik.Web.UI.RadMaskedTextBox to a known
managed provider native type
and this is my code
SqlCommand cmd = new SqlCommand("update RealEstate set DestinationEntity=@speechDirect,FULLName=@name,Individual_Iqama_NR=@egamhNo,Individual_Passport_NR_ID=@passport,Individual_Gender=@six,Individual_Sociall_Status=@martialstate,Individual_Passport_Issue_Date=@passportdate,Individual_Nationality_ID=@nationality,IqamaIssued_From=@egamhsource,Total_Staying_Time_KSA=@stayduration,Individual_Work_Address=@workdisc,Possess_Type=@omntype,Apartment_No=@estateno,Apartment_Floor_No=@storyno,Possess_City_ID=@city,QuarterID=@area,Deed_No=@InstrumentNo,Deed_Date_HijriAfter=@Instrumentdate,Deed_Issue_City_ID=@Instrumentsource,Request_Status=@orderstate,Real_Estate_Area=@estatespace,[notes]=@notes,Incomming_No=@waredno,Incomming_Date_HijriAfter=@wareddate,Qaied_No=@ghaidno,Qaied_Date_HijriAfter=@ghaiddate,ExportNumber=@jihtsdor, ExportDateHijriAfter=@job where Possess_ID=@id", _con);
cmd.CommandType = CommandType.Text;
_con.Open();
cmd.Parameters.AddWithValue("@id", int.Parse(Request.QueryString["Serial"].ToString()));
cmd.Parameters.AddWithValue("@speechDirect", RadComboBox1.SelectedValue);
cmd.Parameters.AddWithValue("@name", txtname.Text);
cmd.Parameters.AddWithValue("@egamhNo",txtegamhno.Text);
cmd.Parameters.AddWithValue("@passport", txtpassportno.Text);
cmd.Parameters.AddWithValue("@six",RDSix.SelectedValue);
cmd.Parameters.AddWithValue("@martialstate", Rdstatus.SelectedValue);
cmd.Parameters.AddWithValue("@passportdate", DateTime.Now);
cmd.Parameters.AddWithValue("@nationality", RdNationality.SelectedValue);
cmd.Parameters.AddWithValue("@egamhsource", txtegamhsou.Text);
cmd.Parameters.AddWithValue("@stayduration", txtstayduration.Text);
cmd.Parameters.AddWithValue("@workdisc", txtjobdirec.Text);
cmd.Parameters.AddWithValue("@omntype", RdownType.SelectedValue);
cmd.Parameters.AddWithValue("@estateno",txtflatNo.Text);
cmd.Parameters.AddWithValue("@storyno", txtstoryNo.Text);
cmd.Parameters.AddWithValue("@city", RDcity.SelectedValue);
cmd.Parameters.AddWithValue("@area", RadComboBox2.SelectedValue);
cmd.Parameters.AddWithValue("@InstrumentNo",txtskno.Text);
cmd.Parameters.AddWithValue("@Instrumentdate", txtskdate.Text);
cmd.Parameters.AddWithValue("@Instrumentsource", Rdsksource.SelectedValue);
cmd.Parameters.AddWithValue("@orderstate", Rdordercase.SelectedValue);
cmd.Parameters.AddWithValue("@estatespace",txtspace.Text);
cmd.Parameters.AddWithValue("@notes", txtcomments.Text);
cmd.Parameters.AddWithValue("@waredno",txtwaredno.Text);
cmd.Parameters.AddWithValue("@wareddate", txtkitabno.Text);
cmd.Parameters.AddWithValue("@ghaidno", txtgaidno.Text);
cmd.Parameters.AddWithValue("@ghaiddate",txtghaiddate.Text);
cmd.Parameters.AddWithValue("@jihtsdor",Rdsksource.SelectedValue);
cmd.Parameters.AddWithValue("@job", txtsaderdate);
int x =cmd.ExecuteNonQuery();
any one could provide suggestion to solve this problem
thanksHello,
I would like suggest you posting it to:
http://www.telerik.com/support
Regards.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Core Data Services in ABAP : No URI-Mapping defined for object type DDLS
Hi ,
When creating a DDL source , I get the error
" No URI-Mapping defined for object type DDLS and object name ZCDSV_01_06".
Can you please suggest what the issue could be?
Thanks,
Chakram GovindarajanNow I am able to proceed to the next step. Not sure how this started working. However, I get the below error when I open the DDL source editor for one particular ABAP system added in the eclipse environment. I however do not get the error when I open the DDL source editor for another system ( AH4) .I am providing the log error details . I updated the ADT installation. However the issue has not been resolved. Also I tried implementing the Note: 1834948. However I cannot find the option "Team -> Share project..." in the ABAP project.
Thanks,
Chakram Govindarajan -
Mapping refcursors with object types in a procedure
Hi all,
I need some help regarding the mapping of refcursors with object types .
Example: Procedure "A" has object types as input/output parameters which lies in the Web Method Application as a API.
We are creating a procedure "B" which has ref cursors as input/ouput parameters
which will map to the Procedure "A"'s object type parameters.
It will be highly needful for the solution.
Regards
SaugataYour pseudocode has a lot of steps in it, but you didn't say which step you need help with. Since I already covered going from a nested table type to a refcursor, I'll assume you want an example that goes the other way now, like from a refcursor to a nested table type. Here's one ...
SQL>
SQL>
SQL> set serveroutput on
SQL>
SQL> create type nested_table_type as table of varchar2(14) ;
2 /
Type created.
SQL> show errors
No errors.
SQL>
SQL>
SQL> create function func
2 ( p_cursor in sys_refcursor )
3 return nested_table_type
4 as
5 v_nested_table nested_table_type ;
6 begin
7
8 fetch p_cursor bulk collect into v_nested_table ;
9 return( v_nested_table );
10
11 end;
12 /
Function created.
SQL> show errors
No errors.
SQL>
SQL> select func( cursor( select dname from dept ) ) as nested_table from dual ;
NESTED_TABLE
NESTED_TABLE_TYPE('ACCOUNTING', 'RESEARCH', 'SALES', 'OPERATIONS')If your cursor selects objects instead of simple data types, the code is pretty much the same.
SQL> create type object_type as object ( c1 varchar2(14), c2 varchar2(13) );
2 /
Type created.
SQL> show errors
No errors.
SQL>
SQL> create type nested_table_type as table of object_type ;
2 /
Type created.
SQL> show errors
No errors.
SQL>
SQL>
SQL>
SQL> create function func
2 ( p_cursor in sys_refcursor )
3 return nested_table_type
4 as
5 v_nested_table nested_table_type ;
6 begin
7
8 fetch p_cursor bulk collect into v_nested_table ;
9 return( v_nested_table );
10
11 end;
12 /
Function created.
SQL> show errors
No errors.
SQL>
SQL> select
2 func( cursor( select object_type( dname, loc ) from dept ) ) as object_table
3 from dual ;
OBJECT_TABLE(C1, C2)
NESTED_TABLE_TYPE
( OBJECT_TYPE('ACCOUNTING', 'NEW YORK'),
OBJECT_TYPE('RESEARCH', 'DALLAS'),
OBJECT_TYPE('SALES', 'CHICAGO'),
OBJECT_TYPE('OPERATIONS', 'BOSTON')
)(NB I manually reformated the query results for clarity). -
Customizing Search Results - Relevance, object type
Hello,
We would like to customize our search so that it will always return pages first, then Global Links, then Documents. Each of these should then be sorted by relevance.
Can anyone suggest what might be the best way to accomplish this?
Thanks!
~Kevin.Hi Kevin
Even I am working on similar UI customization of the search view, so that each object type result is grouped in a different table.
Kindly let me know how to achieve this -
APEX- How to open world document (and other files) stored in a blob column?
Hi,
I have an application developed in Oracle Apex 3.2.1 and RDBMS Oracle 9.2.0.8 (SUN SOLARIS SPARC 64 BITS).
I have a table called BAC_ARQUIVO, with the following structure:
CREATE TABLE BAC_ARQUIVO
(NAME VARCHAR2(4000), /* Name of the file stored in BLOB column */
SUBJECT VARCHAR2(4000), /* A brief description about this file stored */
ID NUMBER, /* An identification of this file - It´s a PK column of this table*/
BLOB_CONTENT BLOB, /* Blob field that store diferent kind of files - XLS, DOC, PPT, PDF, EXE, ZIP, etc);
MIME_TYPE VARCHAR2(4000) /* Identification about which kind of file is stored on BLOB field */
The field BLOB_CONTENT of this table can store:
- Executable files;
- MS-World Documents (DOC);
- Zip Files (ZIP);
- Ms-Excel Files (XLS);
- Ms-Powerpoint files (PPT);
- Adobe documents (PDF);
Actually, in this APEX application, i have developed a interactive Report in which the user can download these files to desktop without problems.
But now, my user would like to know if it´s possible that APEX application can OPEN some of these files stored on this BLOB column WITHOUT download it.
My user would like to see a hiperlink (or button) that, if pressed/acessed, can open a new page (or a page inside application) with the document. He doesn´t need to edit this oppened file. He only wants to see it.
For example, if the file stored in the blob column is ms-word type , so the application will open a MS-WINDOWS application with these file.
Is it possible?
I saw in this forum that it´s possible to open a file stored on "/i/" directory, but i need to open the file stored in BLOB column. I don´t want to store the file in operational system of the server.
Could any one demonstrate to me how it could be done?
Best regards,
Sergio CoutinhoHi Sergio,
This link might be helpful:
http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/apex/r31/apex31nf/apex31blob.htm
Also refer the BLOB Download Format Mask :
{message:id=9716335}
Here I have given the format mask for APEX 4.0, which will slightly differ for 3.2.1 and proposed changes
in the format mask are:
1) Format Mask: DOWNLOAD
2) Content Disposition: Inline
This will be achieved with it:
>
But now, my user would like to know if it´s possible that APEX application can OPEN some of these files stored on this BLOB column WITHOUT download it.
My user would like to see a hiperlink (or button) that, if pressed/acessed, can open a new page (or a page inside application) with the document. He doesn´t need to edit this oppened file. He only wants to see it.
>
Hope it helps!
Regards,
Kiran -
Retriving data through stored procedure returning Table of object type
I am trying to retrieve the data returned as a table(secret_tab_type) of object type(secret_type). Now we can get the secret_tab_type table through
rset = (ResultSet) cstmt.getObject(1); but how to map the SQL object type to Java object type ??
FUNCTION Fetchthat(
secretinfo out SECRET_TAB_TYPE,
message OUT varchar2
) return number;
These are the declaration of secret_type object and secret_tab_type(table returned by fetchthat procedure)
create or replace type secret_type as object
(secret_id number(3),
secret_question varchar2(100),
valid_flag char);
create or replace type secret_tab_type as table of secret_type;Amit,
Your question has been previously asked (and answered) on this forum. I suggest searching this forum's archives for the terms STRUCT and ARRAY.
For your benefit, here are the results of my search:
http://tinyurl.com/auvl8
Good Luck,
Avi. -
Need help on defining object-type dependent attributes for documents
Hi everyone,
I'm trying to define different attributes for documents (attachments), depending on document type.
I performed customizing activities as specified in IMG notes (define structure and table for the attributes, attribute model, register attribute model with table and structure, map model to object type, map object type to document type)
But I didn't find any new BOL in CM GenIL component with my attributes...
I already have type-independent attributes defined, and I see them in the CMDocument BOL.
I don't know how to use my attributes, nor in code niether in UI.
Did I miss something?
Thanks,
Yuliareturn self.amount+self.depositamount;I counld not find any amount field in your type definitions
if self.status='OPEN' thenIs it w_accountt.status ?? since there is no status field in accountmanager_t type
return self.currentamount-self.withdrawalamount;same comments for currentamount
member function deposit(d_accountt account_t,d_transno number default 1) return account_t asWhere as your return expression is a number?? -
Custom Renderer / Embedded Objects
In looking over the developer's guide, it suggests that one would have to create a custom XML renderer to handle deep structured documents (i.e., embedded objects). Is my reading of the renderer chapter correct?
Thanks in advance.Check out the technical brief on a XSL Renderer sample application at:
http://technet.oracle.com/products/ifs/ -
Edmx cannot mapped stored procedure column info not displaying
Hi,
I'm trying to follow the QBE on how to mapped stored proedure in EF.
Everything works fine until I need to Add Import Function where I could not see the list of column info.
I'm using .NET 4.5, EF 5.0, 11gR3 DB, VS 2012 & ODP 11.2.0.3.60 (beta)
Below is my app.config.
<oracle.dataaccess.client>
<settings>
<add name="HR.UPDATE_AND_RETURN_SALARY.RefCursor.NEW_SALARY" value="implicitRefCursor bindinfo='mode=Output'" />
<add name="HR.UPDATE_AND_RETURN_SALARY.RefCursorMetaData.NEW_SALARY.Column.0" value="implicitRefCursor metadata='ColumnName=FIRST_NAME;BaseColumnName=FIRST_NAME;BaseSchemaName=HR;BaseTableName=EMPLOYEES;NATIVEDATATYPE=Varchar2;ProviderType=Varchar2'" />
<add name="HR.UPDATE_AND_RETURN_SALARY.RefCursorMetaData.NEW_SALARY.Column.1" value="implicitRefCursor metadata='ColumnName=SALARY;NATIVEDATATYPE=Number;ProviderType=Int32'" />
</settings>
</oracle.dataaccess.client>
As far as I can tell it seems like VS would use the tags above to figure out the return column info and create a complex type. I could not see why it is not recognizing it.
Please note that I can access an Oracle table successfully and display rows in VS.
Thanks in advanceI'm not sure if you're the person that just logged a SR on this, but I just recently worked the same issue.
It turns out that
a) if you don't pay attention, adding a new Oracle Connection in Server Explorer defaults to the MANAGED ODP.NET (you can still create a connection using UnManaged though).
b) the metadata for MANAGED ODP.NET is different than the metadata for UNManaged. Here's the correct mapping for MANAGED ODP:
oracle.manageddataaccess.client>
<version number="*">
<implicitRefCursor>
<storedProcedure schema="HR" name="UPDATE_AND_RETURN_SALARY">
<refCursor name="NEW_SALARY">
<bindInfo mode="Output" />
<metadata columnOrdinal="0" columnName="FIRST_NAME" providerType="Varchar2" nativeDataType="Varchar2" />
<metadata columnOrdinal="1" columnName="SALARY" providerType="Double" nativeDataType="Number" />
</refCursor>
</storedProcedure>
</implicitRefCursor>
</version>
</oraclemanaged.dataaccess.client> -
How to delete a custom columns from a content-type in Sharepoint Client object model
I have a windows interface where I create a content-type and then create a column and adds that column to the content-type.
//availableCT is my content-type where the column is present.
//get all available fields within this content-type
FieldCollection fieldColl = availableCT.Fields;
clientContext.Load(fieldColl);
clientContext.ExecuteQuery();
foreach (Field field in fieldColl)
//columnFromList is the column that is to be deleted
if (field.InternalName.Equals(columnFromList))
field.DeleteObject();
clientContext.ExecuteQuery(); // this throws an exception
// Additional information: Site columns which are included in content types or on lists cannot be deleted. Please remove all instances of this site column prior to deleting it.hi,
you can use the below code to delete it
using (ClientContext sourceContext = new ClientContext(cmdSpoSite))
Web web = sourceContext.Web;
sourceContext.Load(web);
sourceContext.Load(web.AvailableContentTypes, type => type.Include(c => c.FieldLinks, c => c.Name));
sourceContext.ExecuteQuery();
List<ContentType> ExistingContentType = web.AvailableContentTypes.ToList();
IEnumerable<ContentType> contentTypesList = ExistingContentType.Where(ct => ct.Name == "<ContentTypeName>");
ContentType ctype = contentTypesList.ElementAt(0);
IQueryable<FieldLink> flinks = ctype.FieldLinks.Where(f => f.Name == "<FiledName");
foreach (FieldLink flink in flinks)
flink.DeleteObject();
ctype.Update(true);
sourceContext.ExecuteQuery();
The difference being in your code and above code is you are removeing fileds which is eventually is deleting site column but a site column cannot be deleted if is alreday being used. So you need to deled the FieldLink in content type taht way column is removed
from content type but not from site column.
Now if you want to delete site column you can use your code to deleted Field.
Whenever you see a reply and if you think is helpful,Vote As Helpful! And whenever you see a reply being an answer to the question of the thread, click Mark As Answer -
How to create a custom mapping operator.
Any idea on how to create a custom mapping operator.
An example: When i insert records in a table, i need to populate some columns like "created by" and "Created date" which are constant across many tables. Untill now i created a constant operator with attributed "Created by" and "Created Date" and put it on to a map. I'd like to know if there is a way in Oracle Warehouse builder to created such custom operator.
puli.Hi,
As per next major OWB release (OWB10gR2 a.k.a. Paris) it will become easier to share 'blocks of objects', so then it would be easy to define you Constant only once, and use it in the same configuration all over your project(s).
Right now this is not possible.
I guess you could try to build a table with all these default values, and use this to populate your audit columns.
Good luck, Patrick -
Custom mapped field attach problem
Hi!
I have a field, for which I've written custom field mapping. Everything
seems to run fine, but when I try to attach previously detached instance I
got:
kodo.util.FatalInternalException: kodo.util.FatalInternal
Exception: Cannot attach field "SomeObject.someField" of type "10".
Mapping's getJDBCType() returns Type.OTHER. Field contains java object, but
corresponding database table column is numeric type. No matter what I set
JDBCType to I fail to attach object. When I set type to Type.JAVA_OBJECT I
get exception (when Kodo is reading database tables on startup) that says
that column type DECIMAL isn't compatibile with the type I set in my custom
mapping. When I set it to Type.DECIMAL I got the same error I got with
Types.OTHER ("Cannot attach..").
How should custom mapped fields be attached? I want Kodo to attach and
update object modified on the client side - as for the type (used as I
presume when Kodo is crafting database statement) I want the type declared
in mapping to be used (even it seems to be incompatibile with database
schema, my JDBC driver will take care of it converting it on-the-fly). I've
been looking for some clues in docs, but no success so far. Any hints?
Regards,
PawelUzytkownik "Marc Prud'hommeaux" <[email protected]> napisal w wiadomosci
news:[email protected]...
Pawel-
Can you post the complete stack trace of the error you are getting?Sure, here's what I receive on the client side. Theres nothing in server
side logs.
[java] java.rmi.RemoteException: EJB Exception:; nested exception is:
[java] java.rmi.RemoteException: setByValue(); nested exception is:
[java] kodo.util.FatalInternalException:
kodo.util.FatalInternalException: Cannot attach fi
eld "edu.mypackage.SomeObject.someField" of type "10".
[java] at
weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108
[java] at
weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
:284)
[java] at
weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
:244)
[java] at
edu.mypackage.impl.JVTSessionExtProxy_f0ahbq_EOImpl_811_WL
Stub.setByValue(Unknown Source)
[java] at edu.mypackage.test.JVTSessionTestProxy.setByValue(J
VTSessionTestProxy.java:112)
[java] at
edu.mypackage.test.JUnitTestClientGis3.testGeometryUpdate2(JUnitTestClient
Gis3.java:99)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
[java] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
[java] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
..java
:25)
[java] at java.lang.reflect.Method.invoke(Method.java:324)
[java] at junit.framework.TestCase.runTest(TestCase.java:166)
[java] at junit.framework.TestCase.runBare(TestCase.java:140)
[java] at junit.framework.TestResult$1.protect(TestResult.java:106)
[java] at
junit.framework.TestResult.runProtected(TestResult.java:124)
[java] at junit.framework.TestResult.run(TestResult.java:109)
[java] at junit.framework.TestCase.run(TestCase.java:131)
[java] at
edu.mypackage.test.JUnitBaseTestClient.run(JUnitBaseTestClient.j
ava:118)
[java] at junit.framework.TestSuite.runTest(TestSuite.java:173)
[java] at junit.framework.TestSuite.run(TestSuite.java:168)
[java] at
edu.mypackage.test.ResultTestSuite.run(ResultTestSuite.java:21)
[java] at junit.textui.TestRunner.doRun(TestRunner.java:74)
[java] at junit.textui.TestRunner.start(TestRunner.java:234)
[java] at junit.textui.TestRunner.main(TestRunner.java:112)
[java] Caused by: java.rmi.RemoteException: setByValue(); nested
exception is:
[java] kodo.util.FatalInternalException:
kodo.util.FatalInternalException: Cannot attach fi
eld "edu.mypackage.SomeObject.someField" of type "10".
[java] at edu.mypackage.impl.JVTSessionExtImpl.setByValue(JVT
SessionExtImpl.java:579)
[java] at
edu.mypackage.impl.JVTSessionExtProxy_f0ahbq_EOImpl.setMan
agedEntityByValue(JVTSessionExtProxy_f0ahbq_EOImpl.java:102)
[java] at
edu.mypackage.impl.JVTSessionExtProxy_f0ahbq_EOImpl_WLSkel
..invoke(Unknown Source)
[java] at
weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:466)
[java] at
weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java
:108)
[java] at
weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:409)
[java] at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec
t.jav
a:353)
[java] at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
[java] at
weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:404)
[java] at
weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:3
0)
[java] at
weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
[java] at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
[java] Caused by: kodo.util.FatalInternalException:
kodo.util.FatalInternalException: Cannot at
tach field "edu.mypackage.SomeObject.someField" of type "10".
[java] at
kodo.util.FatalInternalException.writeReplace(FatalInternalException.java:54
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
[java] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
[java] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
..java
:25)
[java] at java.lang.reflect.Method.invoke(Method.java:324)
[java] at
java.io.ObjectStreamClass.invokeWriteReplace(ObjectStreamClass.java:882)
[java] at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1011)
[java] at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1330)
[java] at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1302)
[java] at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1245)
[java] at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
[java] at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1330)
[java] at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1302)
[java] at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1245)
[java] at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
[java] at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
[java] .F
[java] at
weblogic.common.internal.ChunkedObjectOutputStream.writeObject(ChunkedObject
Outpu
tStream.java:114)
[java] at
weblogic.rjvm.MsgAbbrevOutputStream.sendThrowable(MsgAbbrevOutputStream.java
:367)
Regards,
Pawel Swierszcz -
Query with aggregate on custom mapping returning wrong type
I've got a JDOQL query that returns the sum of a single column, where that
column is custom-mapped, but the result I get back is losing precision.
I create the JDOQL query as normal and set the result to the aggregate
expression:
KodoQuery query = (KodoQuery) pm.newQuery(candidateClass, filter);
query.setResult("sum(amount)");
I can also setUnique for good measure as I am expecting just 1 row back:
query.setUnique(true);
The query returns an Integer, but my amount column is a decimal with 5
digits after the decimal point. If I ask for a Double or BigDecimal as the
resultClass, it does return an object of that type, but loses all
precision after the decimal point:
query.setResultClass(BigDecimal.class);
The amount field in my candidate class is of the class Money, a class that
encapsulates a currency and a BigDecimal amount. See
http://www.martinfowler.com/ap2/quantity.html
It is mapped as a custom money mapping to an amount and currency column,
based on the custom mapping in the Kodo examples. I have tried mapping the
amount as a BigDecimal value, and querying the sum of this works. So the
problem seems to be the aggregate query on my custom mapping. Do I need to
write some code for my custom mapping to be able to handle aggregates?
Thanks,
AlexCan you post your custom mapping?
Also, does casting the value have any effect?
q.setResult ("sum((BigDecimal) amount)"); -
Adding custom fields to Embedded Search
Hi All,
I have read the post [here|How to add custom fields to Embedded Search; about adding custom fields to Embedded Search. I am looking to add Employee Subgroup for use in Talent Management (specifically the STVN SuccessionPlanning component) and wanted to know if anyone can expand on the instructions in the link to add this field.
It appears to be part of the HRTMC_PERSON search object connector already and while I've done some IMG configuration the field is showing in SuccessionPlanning, but not displaying any data.
Additionally, I'd be interested in any tips to add information that is not from PA0002 should it be required in the future.
Many thanks,
LukeHi Luke,
I am assuming here that your search request fields are based on HRTCM_CENTRALPERSON search template. To enable your search to work on employee subgroup please do the following
1) Check if the HRTMC_PERSON Template extracts the data from Infotype 0001 via SPRO node 'Define Search Models and Change Pointer' Extraction Class is 'CL_HRTMC_SEARCH_READ_PA_INFTY'.
2) Via ESH_COCKPIT, goto Template Modeler and select your custom Software Component and press Edit. Goto roadmap step 5 - Define Requests - where all search request fields are defined. Its using these fields Talent search works.
3) Select the search request e.g. 'SAP_TALENT_NAKISA', it would then show list searchable attributes in below table. Using 'Add' button select path for PERSK so that it can searched.
It would look like this once selected
OBJID(REL_CP_P)->HRTMC_REL_CP_P_209.REL_CP_P(REL_CP)->HRTMC_PERSON.OBJID->HRTMC_PERSON.ORG_ASSIGNMENT
4) In step SPRO 'Define Search Requests and Search Field Names' , define Employee subgroup field with AliasSearchField = PERSK since thats what is defined in roadmap step 5.
Hope it helps!
Regards,
Ricky Shah
Maybe you are looking for
-
Looking for a good spam-proof guestbook!
Hello. Anyone know of a good guest book component that uses flash and/or cold fusion. The only good ones I can find are with php. :( I don't want to use php. I bought a decent one last year from cfmagic but the evil spam people destroyed my guest boo
-
Photoshop Elements 10 not responding Win 7
I've tried re-installing, cleaning temporary files, reseting to Win 7 compatability and running updates - but as soon as I open the organizer or editor is stops working and says Photoshop Elements is not respondng. Any suggestions before I scrap ado
-
Max no of function keys in a screen . What do u mean by SSCR fields...
give any simple understandable examples how to create function key...event driven programs...
-
Hi All, I have requirement for devloping interface for outbound invoice that is IDOC to be passed on to the middleware(here it is Biztalk(EDI subsystem)). Port configuration is given, RFC is done, 1>Does I need to ask for partner profile bcoz in this
-
ANNA BROWSER - cleap private data
Hello I just upgraded my N8 to ANNA, I like the new browser but I don't know I go to get to the menu that shows "clear private datas" and do clear the datas. I can change the settings of privacy but I cannot actually clear the datas. Can you help ple