robert polidort

Greenhorn
+ Follow
since Apr 09, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by robert polidort

Sorry for the Code tag

So if I well understand it is impossible to have Hibernate to map exactly my existing table structure, apart if I use 2 JoinColumns and that it is not a valid bidir association..

Regards,
Blured.
I've managed to do it by using the following code :
public class A {
...
@OneToOne
@JoinColumn(name="col_B_ID")
private B b;
...
}
---
public class B {
...
@OneToOne
@JoinColumn(name="col_A_ID")
private A a;
...
}

However, as you can see there is no mappedBy attribute. What does it implies ?

Regards,
Blured.
The @joincolumns is when you've got composite foreign keys, which is not my case. I've got one key by class. The 2 classes are related by onetoone relationship. And I'd like that class A to have a foreign key pointing on class B, and that class B to have a foreign key pointing on class A. For the moment I've just manage to have class B to have a foreign key pointing on class A.
So I've tried :

public class A {
...
@OneToOne(mappedBy="a")
private B b;
...
}
---
public class B {
...
@OneToOne
@JoinColumn(name="col_A_ID", referencedColumnName="col_A_ID"))
private A a;
...
}

However, it fills only one side of the relation foreign key. Only B (col_B_ID, col_A_ID)



Regards,
Blured.
The code sample is making a table structure like
A (col_A_ID)
B (col_B_ID, col_A_ID)

What I like to do is to have the following table structure :
A (col_A_ID, col_B_ID)
B (col_B_ID, col_A_ID)

Mapping the fact that A & B classes are OneToOne relationships

Regards,
Blured.
The fact is I'd like to have really the both sides filled not only one. And I cannot manage to do that with hibernate.
Hello,

I've got the following table structure from an existing project which is running with EJB2.0 Entities. I'm migrating those

entities to EJB3.0 JPA Objects. However, I'm faced to the following problem :

I've got a OneToOne bidirectionnal association between class A and class B. The fact is that the database table is made like

this :
table A(col_A_ID, col_A_1, col_A_2, col_B_ID)
table B(col_B_ID, col_B_1, col_B_2, col_A_ID)

We've got a primary key for table A (col_A_ID) and a primary key for table B (col_B_ID)
We've got a foreign key for table A (col_B_ID) and a foreign key for table B (col_A_ID)

I've sawn samples for Hibernate with only one side of the relation mapping the foreign key, but never both sides.

Like that the foreign key Table A.col_B_ID is missing :
---
public class A {
...
@OneToOne(mappedBy="a")
private B b;
...
}
---
public class B {
...
@OneToOne
@JoinColumn(name="col_A_ID")
private A a;
...
}
---

Is it possible to manage to do such a thing with JPA & Hibernate ? Why is it not done by default as with EJB2.0 ? If it is

possible to still do such a thing, is it much more costly concerning the performances of the application ?

Regards,
Blured.
Hi,

Using instjava to push java classes to server side (sybase
ASE 15) in order to use sqlj, I've got the following error
whatever the jar I use even the one provided in sample
(http://www.sypron.nl/udf_prt.html).

<<
The file 'xxxx.class' contained in the jar does not
represent a valid Java class file
>>

C:\>instjava -f c:\DateTimeFormat.jar -U sa
Password:
Server Message: PC - Msg 10795, Level 16, State 1:
The file 'DateTimeFormat.class' contained in the jar does
not represent a valid Java class file.


Have you got any clues to resolve this problem ?

I've tried the compilation with jdk 1.6 & jdk 1.4 without
any better results.

Regards,
Blured.

---
Bonjour,

En utilisant instjava pour pousser des classes java du
côté du serveur Sybase 15 afin de faire du SQLJ,
j'obtiens l'erreur suivante quelque soit le jar que
j'utilise même celui livré en exemple
(http://www.sypron.nl/udf_prt.html).

<<
The file 'xxxx.class' contained in the jar does not
represent a valid Java class file
>>

C:\>instjava -f c:\DateTimeFormat.jar -U sa
Password:
Server Message: PC - Msg 10795, Level 16, State 1:
The file 'DateTimeFormat.class' contained in the jar does
not represent a valid Java class file.

J'ai l'impression que le SQL/J n'est pas beaucoup utilisé.
Les forums ne fourmillent pas d'informations sur son
utilisation.

Auriez-vous une piste ?

J'ai essayé de compiler ma classe en 1.6 et en 1.4 sans
noté de différence quand au message.

Merci d'avance.
Blured.
Hi,

I've done a RestDataSource, however I'd like before fetching to see the content of XML Data sent by this DS in order to extract some metadata informations (name of columns etc ....).



Do you know where I can see the content of the XML sent ? I've tried to access it inside transformResponse, but I'm a little lost on which object to use to see the XML content. Do you know it if it is possible ?

I manage to do :


In order to extract data from the data stuffs, however If I do that in order to dynamically add field to my component I've got the following error



Regards,
Denis.
13 years ago
GWT
Hello,

I've got some problemes with checkbox & t5 for a while. I'd just like to display a page which could contains some checkbox, then submit this page in order to treat the various item corresponding to the ticked checkbox then redirect to the same page with the same checkbox ticked. It is simple with JSP however seems complicated to me to realize with T5



Howard Lewis Ship advise to use the http request without using t5 component in this cas. That was I've done. However for the display when returning to this page after submission documentField.checked is always to false

Perhaps I'm missing something moreover I think I'm making a "usine à gaz".

On the onActivate() I've got :


on the onSuccess() :


on the getDocumentField()


It sux cause getDocumentField() is called much more times than the item displayed. Is it the good way to go ?

If I use a t:checkbox component I see that there isn't a selected property as in T3 for knowing which one is selected.http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/Checkbox.html)

Can you help me resolve this case ?

Regards,
Blured.