• Post Reply Bookmark Topic Watch Topic
  • New Topic

CMP findBy

 
Safin Ahmed
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
i'm using Sun Studio Enterprise 8
And i've used it to create two CMPs from Database
They have a relationship 1-N, that is, one Customer has N CustomerHistory

In the Customer CMP everything is OK
In the CustomerHistory CMP when i do a findBy(any field) i get a Collection with nulls
the number of elements in the Collection is correct but every element is a null
What can be happening here?

The IDE generated everything for me, so i think the configuration files are pretty much OK
The CustomerHistory table has a Primary Key with 2 fields, i don't know if that can be a problem, but i don't think so

Any ideas ?

Thanks
 
Rajesh Pandey Rajesh Pandey
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Safin

I think there will be error of database connectivity pool you try for this if again find any problem then there may other option if not successful then say it

Regards
Rajesh Pandey
email :- rajesh-pandey@hotmail.com
A freelance software Developer
India Delhi
 
Safin Ahmed
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First of all thanks for the reply

I've figured out that the problem is because I have a Customer with a Collection of CustomerHistory

and CustomerHistory has a compound Primary Key (id and version), and the ID is the foreign key to the Customer
That's why everything comes nulled, i've tried with other 1-N relations, and all of them worked (because all of them have simple keys)

Thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!