Tatiana Vorobeva

Greenhorn
+ Follow
since Aug 06, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Tatiana Vorobeva

GWT: 2.4.0
SmartGWT: 2.4 (simple, not pro/EE - I'm just a hobbist).
Google Chrome: 17.0.963.46 (the latest version)

I have a ListGrid with custom DataSource (based on http://forums.smartclient.com/showthread.php?t=4814&page=27).
On loading the page with this grid - it tries to fetch data.
It creates service, runs executeFetch and recieves an error.





ProjectInfo - just a simple object created for DataSource tesing (only long, String, Data). Service works with DB via ProjectInfoDao with HebarnateTemplate.
Tried to make it with gilead and without - doesn't matter.
Simple RPC service (just recieve a String from server) works fine.
"Extends", "implements", "web.xml", "appContext.xml" - are checked - everyting is done the same way as on simple (working) RPC service.

I saw in code examples that response have the following style:
response:

And I have response (in Chrome):


Questions:
1. How I can remove "__gwt_ObjectId: <id>" from response in Chrome Dev Mode?
2. (the most important) What's the reason of these errors? I can't find, why it raises this error on processing this RPC-call.
13 years ago
GWT

Matthew Brown wrote:

Tatiana Vorobeva wrote:In all other cases "... and ((a and b) or c)" <> "and (a and b or c)".


You sure about that?




Oh, sorry, you are right.
I was right about the goal of parentheses, but I confused the operands AND and OR.

Matthew Brown wrote:...the brackets would make no difference...



Everywhere they are used to change operand's priority. It's not working in Hibernate?

In all other cases "... and ((a and b) or c)" <> "and (a and b or c)". Strange, that it's not correct for Hibernate.
How do we should use OR in such cases?
As I understand, he want to use one column for all skills and to use select like this:


or this (to find more than 1 skill)

Hm.
I've found these docs: http://docs.jboss.org/hibernate/core/3.6/javadocs/org/hibernate/Criteria.html#createCriteria(java.lang.String)

According them:


Maybe you need to use "com.test.Student.school" (where "com.test" = Student's class package) instead of "school"?

P.S.: maybe you know some good docs for learning how to use Criteria? I've started to learn Hibernate and want to read about Criteria.
I'm not a specialist on this theme, just one question (sorry, if it's stupid):
Why do you use "Student.class" for the first criteria and simple String "school" in the second?
Hi all!

I have the project: Spring + Hibernate + want to use JSF

I have one main class, f.e. User (userId + userDetails + some other fields) and one additional class, f.e. UserDetails (userDetailsId + user + userId + other fileds).
The reason - dividing often used data (User) and rarely used data (UserDetails).

In User class userDetails mapped this way:


To make it work I should made two parameters in UserDetails class:

+

First - to make link between two classes in Java.
Second - to avoid an error (because there should be a field with the same name as in @PrimaryKeyJoinColumn annotation).

This way makes a problem: if I create UserDetails (and they are linked to User) before User is saved in DB - UserDetails will be saved in DB with user_id = 0 (because Hibernate saves them before the main record - User - and this User is not exist in DB at this moment).
This is a problem for me, because I want to save them in DB together (it's not good to delete a record in the Table each time then operator decides to cancel further user creation).

Two questions:
1. Should I connect Java classes (create User parameter in UserDetails to store the link to the User) or keep it divided with only userId (long) parameter? Did it because of a habit to have some link to the parent record in DB (user_id in user_details table).
2. At present, to store all data correctly I'm saving User with a null in UserDetails parameter, then - create UserDetails - saveOrUpdate User again. Will user_id be stored correctly, if I save User (with already created and linked UserDetails, which will be stored in DB with 0 in user_id) and right after that saveOrUpdate UserDetails (not the whole User)?

I want to make beans User + UserDetils to use them in JSF, and I'm trying to organize it correctly, but a little bit confused.
Problem has been resolved.

There were incompatible versions of Spring (3.0) and Hibernate (4.0).

At present, everything is working with Spring 3.0.5.RELEASE + Hibernate 3.3.2.GA.
The only problem - Dialect class not found: "org.hibernate.dialect.PostgreSQLDialect" (it works only without this property), but it's behind the scope of this topic.
13 years ago
Hi!

I'm trying to start new project with Spring + Hibernate + Maven.

At present, I can't understand what to do with the following error:


appContext:


Dependencies:
screenshot

Maybe I should add some lib?
13 years ago