openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "roger.keays" <roger.ke...@ninthavenue.com.au>
Subject Re: How to pass openjpa.jdbc.* to tools?
Date Wed, 15 Nov 2006 23:03:20 GMT



Marc Prud wrote:
> 
> How exactly are you specifying it on the command line?
> 
Well, I was actually invoking java directly from an ant script in maven so I
don't have to handle the classpath manually. I was using an <arg
value="-mappingDefaults=ForeignKey...,JoinForeignKey..."/>

Other arguments passed this way seemed to work.


> If you specify it like:
> 
> -MappingDefaults='jpa 
> (ForeignKeyDeleteAction=restrict,JoinForeignKeyDeleteAction=cascade)'
> 
I tried 'default(ForeignKey...,JoinForeignKey...)' but this did not work.

Thanks for looking into this. As I mentioned previously, putting this config
var in persistence.xml works fine.

Roger


On Nov 13, 2006, at 10:49 PM, roger.keays wrote:

>
>
> I am using the mapping tool with -action build and -sql out.sql to  
> generate
> a DDL script.  In order to get foreign keys created for me I set
> openjpa.jdbc.MappingDefaults=ForeignKeyDeleteAction=restrict,
> JoinForeignKeyDeleteAction=cascade.
>
> It works when included in persistence.xml, but not the command line  
> or ant
> tasks.
>
>
> Marc Prud wrote:
>>
>>
>> Passing -MappingDefaults (and, I believe, "-mappingDefaults") should
>> certainly work. What indication are you seeing that it isn't working?
>>
>>
>>
>> On Nov 13, 2006, at 7:43 PM, roger.keays wrote:
>>
>>>
>>> I've been trying to pass an openjpa.jdbc.MappingDefaults
>>> configuration to the
>>> mappingTool, but it is just ignored. Is this possible? I tried:
>>>
>>>  java org.apache.openjpa.jdbc.meta.MappingTool -
>>> mappingDefaults=blahblah ...
>>>
>>> and
>>>
>>>  <mappingtool ...>
>>>    <config mappingDefaults="blahblah">
>>>  </mappingtool>
>>>
>>> The docs say to use the last name of the config variable with a
>>> lowercase
>>> initial letter. It works for openjpa.*, but apparently not for
>>> openjpa.jdbc.* ?
>>>
>>> Thanks,
>>>
>>> Roger
>>> -- 
>>> View this message in context: http://www.nabble.com/How-to-pass-
>>> openjpa.jdbc.*-to-tools--tf2627090.html#a7330961
>>> Sent from the open-jpa-dev mailing list archive at Nabble.com.
>>>
>>
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/How-to-pass- 
> openjpa.jdbc.*-to-tools--tf2627090.html#a7332348
> Sent from the open-jpa-dev mailing list archive at Nabble.com.
>




-- 
View this message in context: http://www.nabble.com/How-to-pass-openjpa.jdbc.*-to-tools--tf2627090.html#a7368344
Sent from the open-jpa-dev mailing list archive at Nabble.com.


Mime
View raw message