Rui Felix

Greenhorn
+ Follow
since Jun 13, 2006
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 Rui Felix

Got the problem fixed.

Just needed to specify the table's primary key correctly. My primary key was three attributes and I only had one specified on hibernate.

Many Thanks,
Regards,
Rui Felix
Hi All,

I have two tables related and I built two hbm files.
The relation between tables are one-to-many.
Everything worked fine but I discovered that I am only getting one record from the many table, and I'm sure that I should be getting more thant one record from the many side.

As you can see I've used a Set with a relation of one-to-many.
Do I have something wrong?

Many Impl Class



Main hbm file


Impl class that is called from the first hbm file



Hbm file of Impl class that is called from the first hbm file



Does any one knows what is the problem?

Could any one help?

Many Thanks,
Rui Felix
[ October 01, 2008: Message edited by: Rui Felix ]
Greetings,

I already set some posts because I was not able to save in two table with hibernate with the a schema of Parent/Child type. It is already solved. I've used a set on the Parent side and a composite-id with unsaved-value="any" on child side.
But now I'm having another problem, I can't update the values previously saved. What I want is to get the values from the database, which goes very fine and change this values and set them again in the database. What is happening right now is hibernate tries to insert again instead of update which return a unique constraint (RMS12.RBI_PK) violated.
What I've search tells me that if I use unsaved-value="any" in the composite-id element I need to implicit Update() but I don't know what this means.

Any one had this problem before? How did you solved it?

Many thanks in advance
Rui Felix
Hello,

I already got the answer for my question. I had to make some changes to the TslMultiBuyListImpl.hbm.xml file. Here are the two hbm files:





I also had to set the class from the second hbm file implementing Serializable.

Many Thanks
Rui Felix
[ October 30, 2007: Message edited by: Texugo ]
Greetings,

I really need help on this. I am trying to use Hibernate to insert on two table on the database. The relation is of type Parent/Child. The problem is that it inserts well on the Parent table but on the Child table it doesn't insert.

Debuging through the project I've found out that he makes an INSERT for the first table but for the second table it makes an UPDATE.

The hbm.xml files that I've built are bellow, the first file has lot of thing but what is used for these tables is at the end:



The precious hbm.xml file has a joined-class that works fine and has a set for a collection that is doing an update instead of an INSERT.

The class that is used in the set implements the following hbm.xml file.



Here is the SQL statements that are produced by the hbm.xml files



I really need answers for:

How can I force the hbm.xml file to do an INSERT instead of an UPDATE?

Thanks for any reply

Many Thanks,
Rui F�lix
Hello,

Thank you, but I didn't understood where to use the eval function. The problem is when I do eval it isn't shown nothing.

I'm using eval when I accept the response from the server like the following:




Doing this [B][/B]
doesn't show nothing.

What property of prototype.js I have to trun on start doing that.

Thanks
texugo
Hello all,

I'm having the following problem, I'm using AJAX to make a request to the server when I'm building the response I'm using a lot of javascript to be able to populate the checkboxes and handle information in Arrays. When I receive the response in my principal JSP I catch the response and put it in a DIV tag with the innerHTML property. Until here everything is ok and working fine but then the problems start :
1 : The HTML displayed doesn't have any check box selected. When I know that all check boxes has to be selected.
2 : Can't access to any array created by java script.

My real problem is that I can't access any javascript variables that I declare in the built response and that I set in the div.

Example of what I have:

RESPONSE in a JSP built like a XML FILE:


Now really simple question I think, how can I access to the variable CheckedArray in the principal JSP.

I thought it was interpreted like a local variable.

Thanks All
Texugo
17 years ago
JSP
Hello all,

I'm having the following problem, I'm using AJAX to make a request to the server when I'm building the response I'm using a lot of javascript to be able to populate the checkboxes and handle information in Arrays. When I receive the response in my principal JSP I catch the response and put it in a DIV tag with the innerHTML property. Until here everything is ok and working fine but then the problems start :
1 : The HTML displayed doesn't have any check box selected. When I know that all check boxes has to be selected.
2 : Can't access to any array created by java script.

My real problem is that I can't access any javascript variables that I declare in the built response and that I set in the div.

Example of what I have:

RESPONSE in a JSP built like a XML FILE:


Now really simple question I think, how can I access to the variable CheckedArray in the principal JSP.

I thought it was interpreted like a local variable.

Thanks All
Texugo