Schema-action="none" not respected by join and collection associations

28 views
Skip to first unread message

Tomek Pluskiewicz

unread,
Feb 8, 2011, 12:12:33 PM2/8/11
to nhusers
Hi

Let's assume there's a project, which loads entities from a legacy
database schema. In that schema users are distributed onto 2 tables:
Users and Worksers.

To map that and use schema export (project extend the schema with new
tables) the mapping file looks simmilarily to the one below:

<class name="User" table="Users" mutable="false" schema-action="none">

// id, properties nad such

<join table="Workers">

// other properties and mapped column

</join>
</class>

Now the problem with schema export is that it does not generate Users
table, but it does generate the Workers table. The same applies to a
many-to-many association (idbag for sure, havn't tried the others).
The association table gets generated even if the containing class has
schema-action="none"

Is there a workaround to that or an issue to vote for? Or will I have
to edit the generated script every time?

debop

unread,
Mar 28, 2011, 10:26:43 AM3/28/11
to nhusers
Hi,

Same problem with collection table like this

<class name="User" table="Users" mutable="false" schema-
action="none">
...
<map name="Meta" table="UserMetaTable" mutable="false"
inverse="false" cascade="false">
<key .../>
<index .../>
<composite-element class="MetaClass">
// properties
</composite-element>
</class>

Schema export does not generate "Users" table, but generate
"UserMetaTable" !!!
Reply all
Reply to author
Forward
0 new messages