-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: property-ref broken?
PostPosted: Fri May 20, 2005 3:08 am 
Beginner
Beginner

Joined: Mon Mar 07, 2005 12:02 pm
Posts: 39
Why is my property-ref not working? Am I doing it incorrectly? I couldn’t find any example in the manual about joining with legacy data models. I don’t even know if property-ref is the option I need, I want the join to happen between the address_id's, not the id and address_id.

Hibernate version:3.0



<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping
>
<class
name="za.co.easypay.easycredit.Person"
table="Person"
dynamic-update="false"
dynamic-insert="false"
select-before-update="false"
optimistic-lock="version"
>
<id
name="id"
column="person_id"
type="int"
unsaved-value="null"
>
<generator class="assigned">
</generator>
</id>
<property
name="name"
type="java.lang.String"
update="true"
insert="true"
access="property"
column="name"
/>
<property
name="adress_id"
type="java.lang.String"
update="true"
insert="true"
access="property"
column="adress_id"
/>
<join table="address">
<key column="address_id" property-ref="adress_id"/>
<property name="zip" column="zip"/>
<property name="address" column="address"/>
</join>
</class>

</hibernate-mapping>


select person0_.person_id as person1_, person0_.name as name2_, person0_.address_id as address3_2_, person0_1_.zip as zip3_, person0_1_.address as address3_ from Person person0_ inner join address person0_1_ on person0_.person_id=person0_1_.address_id


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.