You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Devyandu <de...@gmail.com> on 2008/08/02 21:53:59 UTC

Strange problem - all relationships not available at runtime

Need your expert help.
It could be a silly mistake on my part, but here goes.

CourseState has a few fields and these relationships:

<obj-relationship name="studentCoursesArray" source="CourseState"
target="StudentCourses" db-relationship-path="studentCoursesArray"/>
<obj-relationship name="toCourse" source="CourseState" target="Course"
db-relationship-path="toCourse"/>
<obj-relationship name="toState" source="CourseState" target="State"
db-relationship-path="toState"/>

But at runtime whenever I get a CourseState object it exposes only
it's direct properties and the toState relationship. The other two
relationships are not available.

I also did a System.out.println(csobj); And this is what I get

{<ObjectId:CourseState, course_state_id=1>; committed;
[numQuestions=>2; enabled=>N; toState=>?; numCredits=>999]}

The _CourseState class seem fine.
All XMLs have been auto generated and not hand edited.
Any suggestions on what else to look at ?
Thanks
DB

Re: Strange problem - all relationships not available at runtime

Posted by Devyandu <de...@gmail.com>.
Thanks a lot for the hint. That was it.
The changed xml files were not being copied from src to WEB-INF/class
, could be permissions. So the changes I made were being reflected on
the JAVA end but not in the xmls.

I stopped server, deleted files and did a fresh build, all is fine.
Thanks
DB
On Sun, Aug 3, 2008 at 4:58 AM, Andrey Razumovsky
<ra...@gmail.com> wrote:
> Very strange. Are you using some App Server? Are you sure the XMLs used on
> the server side contain those missing rels? If _CourseState is fine, the
> problem must be in XML descriptions
>
> 2008/8/2, Devyandu <de...@gmail.com>:
>>
>> Need your expert help.
>> It could be a silly mistake on my part, but here goes.
>>
>> CourseState has a few fields and these relationships:
>>
>> <obj-relationship name="studentCoursesArray" source="CourseState"
>> target="StudentCourses" db-relationship-path="studentCoursesArray"/>
>> <obj-relationship name="toCourse" source="CourseState" target="Course"
>> db-relationship-path="toCourse"/>
>> <obj-relationship name="toState" source="CourseState" target="State"
>> db-relationship-path="toState"/>
>>
>> But at runtime whenever I get a CourseState object it exposes only
>> it's direct properties and the toState relationship. The other two
>> relationships are not available.
>>
>> I also did a System.out.println(csobj); And this is what I get
>>
>> {<ObjectId:CourseState, course_state_id=1>; committed;
>> [numQuestions=>2; enabled=>N; toState=>?; numCredits=>999]}
>>
>> The _CourseState class seem fine.
>> All XMLs have been auto generated and not hand edited.
>> Any suggestions on what else to look at ?
>> Thanks
>> DB
>>
>

Re: Strange problem - all relationships not available at runtime

Posted by Andrey Razumovsky <ra...@gmail.com>.
Very strange. Are you using some App Server? Are you sure the XMLs used on
the server side contain those missing rels? If _CourseState is fine, the
problem must be in XML descriptions

2008/8/2, Devyandu <de...@gmail.com>:
>
> Need your expert help.
> It could be a silly mistake on my part, but here goes.
>
> CourseState has a few fields and these relationships:
>
> <obj-relationship name="studentCoursesArray" source="CourseState"
> target="StudentCourses" db-relationship-path="studentCoursesArray"/>
> <obj-relationship name="toCourse" source="CourseState" target="Course"
> db-relationship-path="toCourse"/>
> <obj-relationship name="toState" source="CourseState" target="State"
> db-relationship-path="toState"/>
>
> But at runtime whenever I get a CourseState object it exposes only
> it's direct properties and the toState relationship. The other two
> relationships are not available.
>
> I also did a System.out.println(csobj); And this is what I get
>
> {<ObjectId:CourseState, course_state_id=1>; committed;
> [numQuestions=>2; enabled=>N; toState=>?; numCredits=>999]}
>
> The _CourseState class seem fine.
> All XMLs have been auto generated and not hand edited.
> Any suggestions on what else to look at ?
> Thanks
> DB
>